r/tftp: Deploy TFTP server

The *tftp* role installs the *tftp-server* package.  There is
practically no configuration for the TFTP server.  It "just works" out
of the box, as long as its target directory exists.
btop
Dustin 2022-03-17 15:14:21 -05:00
parent 14bfddd0ee
commit 5a284faa5c
1 changed files with 39 additions and 0 deletions

39
roles/tftp/tasks/main.yml Normal file
View File

@ -0,0 +1,39 @@
- name: ensure tftp-server is installed
package:
name: tftp-server
state: present
tags:
- install
- name: ensure tftpboot directory exists
file:
path: /var/lib/tftpboot
owner: root
group: root
mode: ug=rwx,o=rx
state: directory
force: false
tags:
- datadir
- name: ensure tftp server starts at boot
systemd:
name: tftp.socket
enabled: true
tags:
- service
- name: ensure tftp server is running
systemd:
name: tftp.socket
state: started
tags:
- service
- name: ensure firewall is configured for tftp
firewalld:
service: tftp
permanent: true
immediate: true
state: enabled
tags:
- firewall