summaryrefslogtreecommitdiffstats
path: root/lib/ansible/playbooks/undercloud_aarch64.yml
blob: ddaf1b0495fef8e643d405aed4c01244c1f0ee5b (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
44
45
46
47
48
49
50
51
---
- hosts: all
  tasks:
    - name: aarch64 configuration
      block:
        - shell: yum -y reinstall grub2-efi shim
        - copy:
            src: /boot/efi/EFI/centos/grubaa64.efi
            dest: /tftpboot/grubaa64.efi
            remote_src: yes
        - file:
            path: /tftpboot/EFI/centos
            state: directory
            mode: 0755
        - copy:
            content: |
                     set default=local
                     set timeout=5
                     set hidden_timeout_quiet=false
                     menuentry "local"  {
                     configfile (hd0,gpt3)/boot/grub2/grub.cfg
                     }
            dest: /tftpboot/EFI/centos/grub.cfg
            mode: 0644
        - shell: 'openstack-config --set /etc/ironic/ironic.conf pxe uefi_pxe_bootfile_name grubaa64.efi'
        - shell: 'openstack-config --set /etc/ironic/ironic.conf pxe uefi_pxe_config_template \$pybasedir/drivers/modules/pxe_grub_config.template'

        - systemd:
            name: openstack-ironic-conductor
            state: restarted
            enabled: yes
        - replace:
            path: /usr/lib/python2.7/site-packages/ironic/drivers/modules/pxe_grub_config.template
            regexp: 'linuxefi'
            replace: 'linux'
        - replace:
            path: /usr/lib/python2.7/site-packages/ironic/drivers/modules/pxe_grub_config.template
            regexp: 'initrdefi'
            replace: 'initrd'
        - lineinfile:
            path: /tftpboot/map-file
            insertafter: EOF
            state: present
            line: ''
        - shell: "echo 'r ^/EFI/centos/grub.cfg-(.*) /tftpboot/pxelinux.cfg/\\1' | sudo tee --append /tftpboot/map-file"
        - shell: "echo 'r ^/EFI/centos/grub.cfg /tftpboot/EFI/centos/grub.cfg' | sudo tee --append /tftpboot/map-file"
        - systemd:
            name: xinetd
            state: restarted
            enabled: yes
      become: yes