wrapping up deploy items for aarch
[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_bootfile_name grubaa64.efi'
26         - shell: 'openstack-config --set /etc/ironic/ironic.conf pxe uefi_pxe_config_template \$pybasedir/drivers/modules/pxe_grub_config.template'
27
28         - systemd:
29             name: openstack-ironic-conductor
30             state: restarted
31             enabled: yes
32         - replace:
33             path: /usr/lib/python2.7/site-packages/ironic/drivers/modules/pxe_grub_config.template
34             regexp: 'linuxefi'
35             replace: 'linux'
36         - replace:
37             path: /usr/lib/python2.7/site-packages/ironic/drivers/modules/pxe_grub_config.template
38             regexp: 'initrdefi'
39             replace: 'initrd'
40         - lineinfile:
41             path: /tftpboot/map-file
42             insertafter: EOF
43             state: present
44             line: ''
45         - shell: "echo 'r ^/EFI/centos/grub.cfg-(.*) /tftpboot/pxelinux.cfg/\\1' | sudo tee --append /tftpboot/map-file"
46         - shell: "echo 'r ^/EFI/centos/grub.cfg /tftpboot/EFI/centos/grub.cfg' | sudo tee --append /tftpboot/map-file"
47         - systemd:
48             name: xinetd
49             state: restarted
50             enabled: yes
51       become: yes