Files
fedora-infra_ansible/roles/tftp_server/tasks/main.yml
Ryan Lerch 47c68f478d ansiblelint fixes - fqcn[action-core] - template to ansible.builtin.template
Replaces references to template: with ansible.builtin.template

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:30:29 +10:00

62 lines
1.6 KiB
YAML

---
- name: Install tftp server package
ansible.builtin.package: state=present name=tftp-server
tags:
- packages
- tftp_server
- name: Install syslinux package
ansible.builtin.package: state=present name=syslinux
tags:
- packages
- tftp_server
- name: Setup pxelinux.cfg dir
ansible.builtin.file: path=/var/lib/tftpboot/pxelinux.cfg mode=755 state=directory
tags:
- config
- tftp_server
- name: Setup pxelinux.cfg default file
ansible.builtin.copy: src=default.{{ inventory_hostname }} dest=/var/lib/tftpboot/pxelinux.cfg/default mode=644
tags:
- config
- tftp_server
when: datacenter != 'iad2'
- name: Enable tftp socket service
service: state=started enabled=true name=tftp.socket
tags:
- service
- config
- tftp_server
- name: Fill up the tftpboot directory
synchronize: src="{{ bigfiles }}/tftpboot/" dest=/var/lib/tftpboot/
tags:
- tftp_server
- name: Set permissions on the rhcos tftpboot folder
ansible.builtin.file:
path: /var/lib/tftpboot/rhcos
mode: '0755'
tags:
- tftp_server
when: datacenter == 'iad2'
- name: Copy rhcos files to images folder
ansible.builtin.copy:
src: "/var/lib/tftpboot/rhcos/"
dest: "/var/lib/tftpboot/images/RHCOS/4.8/x86_64/"
remote_src: yes
tags:
- tftp_server
when: datacenter == 'iad2'
# - name: Generate custom configs
# ansible.builtin.template: src=grubhost.cfg.j2 dest="/var/lib/tftpboot/uefi/{{ hostvars[item].install_mac }}"
# with_items: "{{ groups['all'] }}"
# when: "hostvars[item].install_noc == inventory_hostname"
# tags:
# - tftp_server