ansible-role-tftpd-hpa/tasks/config_tftpd.yml
2018-09-11 22:07:50 -04:00

35 lines
850 B
YAML

---
- name: config_tftpd | ensuring tftp_directory exists
file:
dest: "{{ tftp_directory }}"
state: directory
owner: tftp
group: tftp
become: true
- name: config_tftpd | configuring tftpd
template:
src: etc/default/tftpd-hpa.j2
dest: /etc/default/tftpd-hpa
owner: root
group: root
mode: 0644
become: true
notify: restart tftpd-hpa
- name: config_tftpd | Downloading Netboot
get_url:
url: "{{ tftp_netboot_url }}/{{ tftp_netboot_file }}"
dest: "{{ tftp_directory }}/{{ tftp_netboot_file }}"
become: true
when: tftp_netboot_enable
- name: config_tftpd | Extracting Netboot
unarchive:
src: "{{ tftp_directory }}/{{ tftp_netboot_file }}"
dest: "{{ tftp_directory }}"
copy: false
args:
creates: "{{ tftp_directory }}/pxelinux.0"
become: true
when: tftp_netboot_enable