4 - name: Generate SSH key for stack if missing
5 shell: test -e ~/.ssh/id_rsa || ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
6 - name: Fix ssh key for stack
7 shell: restorecon -r /home/stack
10 path: /home/stack/nics
16 src: /root/.ssh/id_rsa.pub
17 dest: /home/stack/jumphost_id_rsa.pub
22 src: "{{ apex_temp_dir }}/{{ item }}.yaml"
23 dest: "/home/stack/nics/{{ item }}.yaml"
32 regexp: 'Defaults\s*requiretty'
36 path: /etc/environment
38 line: "http_proxy={{ http_proxy }}"
42 path: /etc/environment
43 regexp: '^https_proxy'
44 line: "https_proxy={{ https_proxy }}"
47 - name: openstack-configs undercloud
48 shell: openstack-config --set undercloud.conf DEFAULT {{ item }}
49 with_items: "{{ undercloud_config }}"
50 - name: openstack-configs ironic
51 shell: openstack-config --set /etc/ironic/ironic.conf {{ item }}
53 with_items: "{{ ironic_config }}"
55 path: /usr/lib/python2.7/site-packages/ironic/common/pxe_utils.py
56 regexp: '_link_ip_address_pxe_configs'
57 line: ' _link_mac_pxe_configs(task)'
60 - name: undercloud install
61 shell: openstack undercloud install &> apex-undercloud-install.log
65 - name: undercloud install retry
66 shell: openstack undercloud install >> apex-undercloud-install.log 2>&1
70 - name: fetch undercloud log
72 src: /home/stack/apex-undercloud-install.log
73 dest: "{{ apex_temp_dir }}/"
75 - name: openstack-configs nova
76 shell: openstack-config --set /etc/nova/nova.conf DEFAULT {{ item }}
78 with_items: "{{ nova_config }}"
79 - name: restart nova services
85 - openstack-nova-conductor
86 - openstack-nova-compute
88 - openstack-nova-scheduler
89 - name: openstack-configs neutron
90 shell: openstack-config --set /etc/neutron/neutron.conf DEFAULT {{ item }}
92 with_items: "{{ neutron_config }}"
93 - name: restart neutron services
101 - name: configure external network vlan ifcfg
103 src: external_vlan_ifcfg.yml.j2
104 dest: "/etc/sysconfig/network-scripts/ifcfg-vlan{{ external_network.vlan }}"
110 - external_network.vlan != "native"
111 - external_network.enabled
112 - name: bring up vlan ifcfg
113 shell: "ifup vlan{{ external_network.vlan }}"
116 - external_network.vlan != "native"
117 - external_network.enabled
118 - name: assign IP to native eth2
119 shell: ip a a {{ external_network.ip }}/{{ external_network.prefix }} dev eth2
122 - external_network.vlan == "native"
123 - external_network.enabled
125 - name: bring up eth2
126 shell: ip link set up dev eth2
128 - external_network.vlan == "native"
129 - external_network.enabled
132 - name: assign IP to native eth0 if aarch64
133 shell: ip a a {{ external_network.ip }}/{{ external_network.prefix }} dev eth0
136 - external_network.vlan == "native"
137 - external_network.enabled
139 - name: bring up eth0 if aarch64
140 shell: ip link set up dev eth0
142 - external_network.vlan == "native"
143 - external_network.enabled
146 - name: fetch storage environment file
148 src: /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml
149 dest: "{{ apex_temp_dir }}/"
152 - include: undercloud_aarch64.yml