tlu/salt/states/atftp/init.sls

38 lines
787 B
Plaintext
Raw Normal View History

2021-09-23 10:54:33 +00:00
Install syslinux:
pkg.installed:
- name: syslinux
Install atftp:
pkg.installed:
- name: atftp
{% set files = ['memdisk', 'poweroff.com', 'pxelinux.0', 'vesamenu.c32'] -%}
{% for file in files -%}
Linking {{ file }}:
file.symlink:
- name: /srv/tftpboot/{{ file }}
- target: /usr/share/syslinux/{{ file }}
{% endfor %}
2021-09-24 06:09:59 +00:00
copy bootx64.efi:
file.managed:
- name: /srv/tftpboot/bootx64.efi
- source: /usr/share/efi/x86_64/shim.efi
copy grub.efi:
file.managed:
- name: /srv/tftpboot/grub.efi
- source: /usr/share/efi/x86_64/grub.efi
2021-09-23 10:54:33 +00:00
Add files to tftpboot:
file.recurse:
- name: /srv/tftpboot
- source: salt://atftp/files
- include_empty: True
Start the atftpd.socket:
service.running:
- name: atftpd.socket
- enable: True