ansible/roles/phone-provisioning/tasks/main.yml
2024-11-25 18:40:29 -05:00

25 lines
826 B
YAML

- ansible.builtin.include_tasks:
file: install_apache2.yml
- ansible.builtin.include_tasks:
file: install_tftpd.yml
- name: Copy phone files
ansible.builtin.copy:
src: tftpboot/
dest: /var/lib/tftpboot/
- name: Configure TFTP provisioning server
ansible.builtin.lineinfile:
path: /etc/default/tftpd-hpa
regexp: '^TFTP_DIRECTORY='
line: TFTP_DIRECTORY="/var/lib/tftpboot"
notify: restart tftpd
- name: Configure HTTP provisioning server
ansible.builtin.template:
src: 001-tftpboot.conf.j2
dest: /etc/apache2/sites-available/001-tftpboot.conf
notify: reload apache2
- name: Enable HTTP provisioning server
ansible.builtin.file:
src: /etc/apache2/sites-available/001-tftpboot.conf
dest: /etc/apache2/sites-enabled/001-tftpboot.conf
state: link
notify: reload apache2