Fixes undercloud install failure with setting hostname
[apex.git] / lib / ansible / playbooks / configure_undercloud.yml
index 96080e5..493cd1a 100644 (file)
       with_items:
         - controller
         - compute
+    - name: Copy container prep env file to undercloud
+      copy:
+        src: "{{ apex_temp_dir }}/containers-prepare-parameter.yaml"
+        dest: "/home/stack/containers-prepare-parameter.yaml"
+        owner: stack
+        group: stack
+        mode: 0644
     - lineinfile:
         path: /etc/sudoers
         regexp: 'Defaults\s*requiretty'
       become: yes
       with_items: "{{ nova_config }}"
     - name: restart nova services
-      docker_container:
-        name: "{{ item }}"
-        state: started
-        restart: yes
+      shell: "{{ container_client }} restart {{ item }}"
       with_items:
         - nova_conductor
         - nova_compute
         - nova_api
         - nova_scheduler
+      become: yes
     - name: openstack-configs neutron
       shell: openstack-config --set /var/lib/config-data/neutron/etc/neutron/neutron.conf DEFAULT {{ item }}
       become: yes
       with_items: "{{ neutron_config }}"
     - name: restart neutron services
-      docker_container:
-        name: "{{ item }}"
-        state: started
-        restart: yes
+      shell: "{{ container_client }} restart {{ item }}"
       with_items:
         - neutron_api
         - neutron_dhcp
+      become: yes
     - name: openstack-configs ironic
       shell: openstack-config --set /var/lib/config-data/ironic/etc/ironic/ironic.conf {{ item }}
       become: yes
       with_items: "{{ ironic_config }}"
     - name: restart ironic services
-      docker_container:
-        name: "{{ item }}"
-        state: started
-        restart: yes
+      shell: "{{ container_client }} restart {{ item }}"
       with_items:
         - ironic_api
         - ironic_conductor
         - ironic_inspector
-    # will need to modify the below to patch the container
-    - lineinfile:
-        path: /usr/lib/python2.7/site-packages/ironic/common/pxe_utils.py
-        regexp: '_link_ip_address_pxe_configs'
-        line: '        _link_mac_pxe_configs(task)'
-      when: aarch64
+      become: yes
     - name: configure external network vlan ifcfg
       template:
         src: external_vlan_ifcfg.yml.j2
       when:
         - external_network.vlan == "native"
         - external_network.enabled
-        - not aarch64
     - name: bring up eth2
       shell: ip link set up dev eth2
       when:
         - external_network.vlan == "native"
         - external_network.enabled
-        - not aarch64
-      become: yes
-    - name: assign IP to native eth0 if aarch64
-      shell: ip a a {{ external_network.ip }}/{{ external_network.prefix }} dev eth0
       become: yes
-      when:
-        - external_network.vlan == "native"
-        - external_network.enabled
-        - aarch64
     - name: bring up eth0 if aarch64
       shell: ip link set up dev eth0
       when: