This commit is contained in:
Jonas Forsberg 2021-10-25 10:08:24 +02:00
parent faf4242df0
commit bec450fc7f
No known key found for this signature in database
GPG Key ID: F2E9818C70350CC9
9 changed files with 29 additions and 26 deletions

View File

@ -6,32 +6,6 @@ Install atftp:
pkg.installed: pkg.installed:
- name: atftp - 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: Start the atftpd.socket:
service.running: service.running:
- name: atftpd.socket - name: atftpd.socket

View File

Before

Width:  |  Height:  |  Size: 673 KiB

After

Width:  |  Height:  |  Size: 673 KiB

3
salt/states/pxe/init.sls Normal file
View File

@ -0,0 +1,3 @@
include:
- pxe.pxe
- pxe.harvester

25
salt/states/pxe/pxe.sls Normal file
View File

@ -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

View File

@ -15,5 +15,6 @@ base:
- docker.registry - docker.registry
- remote-desktop - remote-desktop
- wol - wol
- pxe
- tlu-harvester - tlu-harvester
- nfs-server - nfs-server