Make introspection optional
[apex.git] / lib / ansible / playbooks / deploy_overcloud.yml
index 19e4638..aa3d806 100644 (file)
       with_items:
         - network-environment.yaml
         - instackenv.json
-        - opnfv-environment.yaml
         - overcloud-full.qcow2
         - deploy_command
         - virtual-environment.yaml
         - baremetal-environment.yaml
+        - "{{ apex_env_file }}"
+    - name: Copy network data to undercloud
+      copy:
+        src: "{{ apex_temp_dir }}/network_data.yaml"
+        dest: "/home/stack/network_data.yaml"
+        owner: stack
+        group: stack
+        mode: 0644
+      when: os_version != 'ocata'
     - copy:
         src: "{{ apex_temp_dir }}/storage-environment.yaml"
         dest: /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml
         state: restarted
         enabled: yes
       become: yes
+    - name: Remove Ceph OSD from ceph storage role
+      lineinfile:
+        path: /usr/share/openstack-tripleo-heat-templates/roles_data.yaml
+        line: '    - OS::TripleO::Services::CephOSD'
+        owner: root
+        group: root
+        state: absent
+      become: yes
+    - name: Insert Ceph OSDs into Compute role
+      lineinfile:
+        path: /usr/share/openstack-tripleo-heat-templates/roles_data.yaml
+        insertbefore:  '^\s*-\sOS::TripleO::Services::NovaCompute$'
+        line: '    - OS::TripleO::Services::CephOSD'
+        owner: root
+        group: root
+      become: yes
     - name: Upload glance images
       shell: "{{ stackrc }} && openstack overcloud image upload"
       become: yes
       become_user: stack
     - name: Import inventory (baremetal)
       shell: "{{ stackrc }} && openstack overcloud node import instackenv.json"
-      when: not virtual
+      when: introspect
     - name: Introspect inventory (baremetal)
       shell: "{{ stackrc }} && openstack overcloud node introspect --all-manageable --provide"
-      when:
-        - not virtual
-        - not aarch64
+      when: introspect
     - name: Import inventory (virtual)
       shell: "{{ stackrc }} && openstack overcloud node import --provide instackenv.json"
-      when: virtual
+      when: not introspect
     - name: Set flavors
       shell: '{{ stackrc }} && openstack flavor set --property "cpu_arch"="{{ ansible_architecture }}" {{ item }}'
       with_items: