diff --git a/metal/roles/pxe-boot/tasks/server.yml b/metal/roles/pxe-boot/tasks/server.yml index 6813d0a7..133f4b22 100644 --- a/metal/roles/pxe-boot/tasks/server.yml +++ b/metal/roles/pxe-boot/tasks/server.yml @@ -47,15 +47,10 @@ src: tftp/tftpboot/grub.cfg.j2 dest: "{{ role_path }}/build/tftp/tftpboot/grub.cfg" -- name: Render shared kickstart config +- name: Render machine specific Butane config template: - src: http/kickstart/fedora.ks.j2 - dest: "{{ role_path }}/build/http/kickstart/fedora.ks" - -- name: Render seperate network kickstart config for each node - template: - src: http/kickstart/network/network.ks.j2 - dest: "{{ role_path }}/build/http/kickstart/network/{{ hostvars[item]['mac'] }}.ks" + src: http/ignition/ignition.yaml + dest: "{{ role_path }}/build/http/ignition/{{ hostvars[item]['mac'] }}.yaml" loop: "{{ groups['metal'] }}" - name: Start ephemeral PXE server diff --git a/metal/roles/pxe-boot/templates/http/ignition/ignition.yaml b/metal/roles/pxe-boot/templates/http/ignition/ignition.yaml index a616a95e..de1d85d5 100644 --- a/metal/roles/pxe-boot/templates/http/ignition/ignition.yaml +++ b/metal/roles/pxe-boot/templates/http/ignition/ignition.yaml @@ -4,7 +4,7 @@ passwd: users: - name: core ssh_authorized_keys: - - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBbqNJWKwLmwkeHQVUVT/pEis/wvRqRSKG9Dpl166NGp # TODO template + - {{ ssh_public_key }} storage: # Set hostname @@ -12,7 +12,7 @@ storage: - path: /etc/hostname mode: 0644 contents: - inline: metal3 # TODO template + inline: {{ hostvars[item]['inventory_hostname'] }} # Set timezone links: - path: /etc/localtime