ansible-role-tftpd-hpa/tasks/config_tftpd.yml

36 lines
850 B
YAML
Raw Permalink Normal View History

---
- name: config_tftpd | ensuring tftp_directory exists
file:
dest: "{{ tftp_directory }}"
state: directory
owner: tftp
group: tftp
2018-09-12 04:07:50 +02:00
become: true
- name: config_tftpd | configuring tftpd
template:
2018-09-12 04:07:50 +02:00
src: etc/default/tftpd-hpa.j2
dest: /etc/default/tftpd-hpa
owner: root
group: root
mode: 0644
2018-09-12 04:07:50 +02:00
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 }}"
2018-09-12 04:07:50 +02:00
become: true
when: tftp_netboot_enable
- name: config_tftpd | Extracting Netboot
unarchive:
src: "{{ tftp_directory }}/{{ tftp_netboot_file }}"
dest: "{{ tftp_directory }}"
2018-09-12 04:07:50 +02:00
copy: false
args:
creates: "{{ tftp_directory }}/pxelinux.0"
2018-09-12 04:07:50 +02:00
become: true
when: tftp_netboot_enable