e8b2818c241ee63c2bc37b08d545ff15d1427a26
[apex.git] / lib / ansible / playbooks / undercloud_aarch64.yml
1 ---
2 - hosts: all
3   tasks:
4     - name: aarch64 configuration
5       block:
6         - shell: yum -y reinstall grub2-efi shim
7         - copy:
8             src: /boot/efi/EFI/centos/grubaa64.efi
9             dest: /tftpboot/grubaa64.efi
10             remote_src: yes
11         - file:
12             path: /tftpboot/EFI/centos
13             state: directory
14             mode: 0755
15         - copy:
16             content: |
17                      set default=local
18                      set timeout=5
19                      set hidden_timeout_quiet=false
20                      menuentry "local"  {
21                      configfile (hd0,gpt3)/boot/grub2/grub.cfg
22                      }
23             dest: /tftpboot/EFI/centos/grub.cfg
24             mode: 0644
25         - shell: 'openstack-config --set /etc/ironic/ironic.conf pxe uefi_pxe_config_template $pybasedir/drivers/modules/pxe_grub_config.template'
26         - shell: 'openstack-config --set /etc/ironic/ironic.conf pxe uefi_pxe_bootfile_name grubaa64.efi'
27         - systemd:
28             name: openstack-ironic-conductor
29             state: restarted
30             enabled: yes
31         - replace:
32             path: /usr/lib/python2.7/site-packages/ironic/drivers/modules/pxe_grub_config.template
33             regexp: 'linuxefi'
34             replace: 'linux'
35         - replace:
36             path: /usr/lib/python2.7/site-packages/ironic/drivers/modules/pxe_grub_config.template
37             regexp: 'initrdefi'
38             replace: 'initrd'
39         - lineinfile:
40             path: /tftpboot/map-file
41             insertafter: EOF
42             state: present
43             line: ''
44         - shell: "echo 'r ^/EFI/centos/grub.cfg-(.*) /tftpboot/pxelinux.cfg/\\1' | sudo tee --append /tftpboot/map-file"
45         - shell: "echo 'r ^/EFI/centos/grub.cfg /tftpboot/EFI/centos/grub.cfg' | sudo tee --append /tftpboot/map-file"
46         - systemd:
47             name: xinetd
48             state: restarted
49             enabled: yes
50       become: yes