xci: Drop AIO specific playbook 13/48813/2
authorMarkos Chandras <mchandras@suse.de>
Tue, 12 Dec 2017 14:03:42 +0000 (14:03 +0000)
committerMarkos Chandras <mchandras@suse.de>
Thu, 14 Dec 2017 08:49:44 +0000 (08:49 +0000)
The configure-opnfvhost playbook which is used for all flavors except
AIO can also be used for AIO if it's adapted to not configure networking
on the host and also do not fail if there aren't any OSA variables files
available so lets do all that in order to avoid duplicating code across
flavors.

Change-Id: I58379d8b52094294b9349494753ffcdd44982013
Signed-off-by: Markos Chandras <mchandras@suse.de>
xci/file/aio/configure-opnfvhost.yml [deleted file]
xci/playbooks/configure-opnfvhost.yml

diff --git a/xci/file/aio/configure-opnfvhost.yml b/xci/file/aio/configure-opnfvhost.yml
deleted file mode 100644 (file)
index 76a3619..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
----
-- hosts: opnfv
-  remote_user: root
-  vars_files:
-    - ../var/opnfv.yml
-  roles:
-    - { role: clone-repository, project: "openstack/openstack-ansible", repo: "{{ OPENSTACK_OSA_GIT_URL }}", dest: "{{ OPENSTACK_OSA_PATH }}", version: "{{ OPENSTACK_OSA_VERSION }}" }
-  tasks:
-    - name: Synchronize local development openstack-ansible repository to XCI paths
-      synchronize:
-        src: "{{ OPENSTACK_OSA_DEV_PATH }}"
-        dest: "{{ OPENSTACK_OSA_PATH }}"
-        recursive: yes
-        delete: yes
-      when:
-        - OPENSTACK_OSA_DEV_PATH != ""
-    - name: bootstrap ansible on opnfv host
-      command: "/bin/bash ./scripts/bootstrap-ansible.sh"
-      args:
-        chdir: "{{OPENSTACK_OSA_PATH}}"
-    - name: Configure AIO tempest
-      lineinfile:
-        path: "{{ OPENSTACK_OSA_PATH }}/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2"
-        regexp: "^{{ item }}.*"
-        line: "{{ item }}: {{ RUN_TEMPEST | bool }}"
-        state: present
-      with_items:
-        - "tempest_install"
-        - "tempest_run"
-    - name: bootstrap opnfv host as aio
-      command: "/bin/bash ./scripts/bootstrap-aio.sh"
-      args:
-        chdir: "{{OPENSTACK_OSA_PATH}}"
-      environment:
-        SCENARIO: "{{ (XCI_CEPH_ENABLED == 'true') | ternary('ceph', 'aio') }}"
-    - name: Load distribution variables
-      include_vars:
-        file: ../var/{{ ansible_os_family }}.yml
-    - name: install opnfv required packages
-      package:
-        name: "{{ opnfv_required_packages }}"
-        state: latest
-    - name: install opnfv required pip packages
-      pip:
-        name: "{{ opnfv_required_pip }}"
-        state: present
index 0ceacc0..30831be 100644 (file)
@@ -26,6 +26,7 @@
 
   roles:
     - role: configure-network
+      when: XCI_FLAVOR != "aio"
 
   tasks:
     - name: generate SSH keys
       shell: "/bin/cp -rf {{OPENSTACK_OSA_PATH}}/etc/openstack_deploy {{OPENSTACK_OSA_ETC_PATH}}"
     - name: copy openstack_user_config.yml
       shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/openstack_user_config.yml {{OPENSTACK_OSA_ETC_PATH}}"
+      failed_when: false
     - name: copy all user override files
       shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_variables.yml {{OPENSTACK_OSA_ETC_PATH}}"
+      failed_when: false
     - name: copy cinder.yml
       shell: "/bin/cp -rf {{ remote_xci_path }}/xci/file/cinder.yml {{OPENSTACK_OSA_ETC_PATH}}/env.d"
     - name: Configure AIO tempest
     - name: Load distribution variables
       include_vars:
         file: "{{ item }}"
+      failed_when: false
       with_items:
         - ../var/opnfv.yml
         - ../var/{{ ansible_os_family }}.yml