blob: efcbdabdb88fa77904c8d72ea44f9410e5291b46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
---
- hosts: all
tasks:
- name: aarch64 configuration
block:
- copy:
src: /boot/efi/EFI/centos/grubaa64.efi
dest: /var/lib/config-data/puppet-generated/ironic/var/lib/ironic/tftpboot/grubaa64.efi
remote_src: yes
- file:
path: /var/lib/config-data/puppet-generated/ironic/var/lib/ironic/tftpboot/EFI/centos
state: directory
mode: 0755
- copy:
content: |
set default=local
set timeout=5
set hidden_timeout_quiet=false
menuentry "local" {
configfile /var/lib/ironic/tftpboot/$net_default_mac.conf
}
dest: /var/lib/config-data/puppet-generated/ironic/var/lib/ironic/tftpboot/EFI/centos/grub.cfg
mode: 0644
- shell: 'sudo crudini --set /var/lib/config-data/puppet-generated/ironic/etc/ironic/ironic.conf pxe pxe_bootfile_name_by_arch aarch64:grubaa64.efi'
- shell: 'sudo crudini --set /var/lib/config-data/puppet-generated/ironic/etc/ironic/ironic.conf pxe pxe_config_template_by_arch aarch64:\$pybasedir/drivers/modules/pxe_grub_config.template'
- shell: 'docker exec -u root ironic_conductor sed -i "s/initrdefi/initrd/g" /usr/lib/python2.7/site-packages/ironic/drivers/modules/pxe_grub_config.template'
- shell: 'docker exec -u root ironic_conductor sed -i "s/linuxefi/linux/g" /usr/lib/python2.7/site-packages/ironic/drivers/modules/pxe_grub_config.template'
- lineinfile:
path: /var/lib/config-data/puppet-generated/ironic/var/lib/ironic/tftpboot/map-file
insertafter: EOF
state: present
line: ''
- shell: "echo 'r ^/EFI/centos/grub.cfg-(.*) /var/lib/ironic/tftpboot/pxelinux.cfg/\\1' | sudo tee --append /var/lib/config-data/puppet-generated/ironic/var/lib/ironic/tftpboot/map-file"
- shell: "echo 'r ^/EFI/centos/grub.cfg /var/lib/ironic/tftpboot/EFI/centos/grub.cfg' | sudo tee --append /var/lib/config-data/puppet-generated/ironic/var/lib/ironic/tftpboot/map-file"
- shell: "docker restart {{ item }}"
with_items:
- ironic_conductor
- ironic_pxe_tftp
- systemd:
name: xinetd
state: restarted
enabled: yes
become: yes
|