diff --git a/salt/states/atftp/init.sls b/salt/states/atftp/init.sls index 13835bc..26c2c8c 100644 --- a/salt/states/atftp/init.sls +++ b/salt/states/atftp/init.sls @@ -6,32 +6,6 @@ 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 %} - -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 - -Add files to tftpboot: - file.recurse: - - name: /srv/tftpboot - - source: salt://atftp/files - - include_empty: True - - replace: False - Start the atftpd.socket: service.running: - name: atftpd.socket diff --git a/salt/states/atftp/files/grub.cfg b/salt/states/pxe/files/grub.cfg similarity index 100% rename from salt/states/atftp/files/grub.cfg rename to salt/states/pxe/files/grub.cfg diff --git a/salt/states/atftp/files/harvester.cfg b/salt/states/pxe/files/harvester.cfg similarity index 100% rename from salt/states/atftp/files/harvester.cfg rename to salt/states/pxe/files/harvester.cfg diff --git a/salt/states/atftp/files/opensuse.png b/salt/states/pxe/files/opensuse.png similarity index 100% rename from salt/states/atftp/files/opensuse.png rename to salt/states/pxe/files/opensuse.png diff --git a/salt/states/atftp/files/pxelinux.cfg/default b/salt/states/pxe/files/pxelinux.cfg/default similarity index 100% rename from salt/states/atftp/files/pxelinux.cfg/default rename to salt/states/pxe/files/pxelinux.cfg/default diff --git a/salt/states/atftp/files/tlu-harvester.cfg b/salt/states/pxe/files/tlu-harvester.cfg similarity index 100% rename from salt/states/atftp/files/tlu-harvester.cfg rename to salt/states/pxe/files/tlu-harvester.cfg diff --git a/salt/states/pxe/init.sls b/salt/states/pxe/init.sls new file mode 100644 index 0000000..da035b6 --- /dev/null +++ b/salt/states/pxe/init.sls @@ -0,0 +1,3 @@ +include: + - pxe.pxe + - pxe.harvester diff --git a/salt/states/pxe/pxe.sls b/salt/states/pxe/pxe.sls new file mode 100644 index 0000000..48c71a8 --- /dev/null +++ b/salt/states/pxe/pxe.sls @@ -0,0 +1,25 @@ +{% 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 %} + +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 + +Add default files to tftpboot: + file.recurse: + - name: /srv/tftpboot + - source: salt://pxe/files + - include_empty: True + - replace: False + diff --git a/salt/states/top.sls b/salt/states/top.sls index 24762ea..57db3e1 100644 --- a/salt/states/top.sls +++ b/salt/states/top.sls @@ -15,5 +15,6 @@ base: - docker.registry - remote-desktop - wol + - pxe - tlu-harvester - nfs-server