xci: Gain elevated privileges to remove the XCI_DEVEL_ROOT directory 93/42693/7
authorMarkos Chandras <mchandras@suse.de>
Tue, 19 Sep 2017 20:59:25 +0000 (21:59 +0100)
committerMarkos Chandras <mchandras@suse.de>
Thu, 21 Sep 2017 20:51:42 +0000 (21:51 +0100)
This is similar to 0927671781f6875926dac2e5f4bb10816e67070c. We need
elevated privileges to remove the XCI_DEVEL_ROOT directory so move this
role to its own play.

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

index 708ad61..5ef1932 100644 (file)
@@ -1,11 +1,17 @@
 ---
 - hosts: opnfv
   remote_user: root
-  vars_files:
+  gather_facts: true
+  become: yes
   vars_files:
     - ../var/opnfv.yml
   roles:
     - role: remove-folders
+
+- hosts: opnfv
+  remote_user: root
+  vars_files:
+    - ../var/opnfv.yml
     - { role: clone-repository, project: "openstack/openstack-ansible", repo: "{{ OPENSTACK_OSA_GIT_URL }}", dest: "{{ OPENSTACK_OSA_PATH }}", version: "{{ OPENSTACK_OSA_VERSION }}" }
   tasks:
     - name: bootstrap ansible on opnfv host
index 10dd694..aebde61 100644 (file)
@@ -9,6 +9,7 @@
 ##############################################################################
 - hosts: localhost
   connection: local
+  become: yes
   vars_files:
     - ../var/opnfv.yml
   pre_tasks:
         file: ../var/{{ ansible_os_family }}.yml
   roles:
     - role: remove-folders
+
+- hosts: localhost
+  connection: local
+  vars_files:
+    - ../var/opnfv.yml
+  pre_tasks:
+    - name: Load distribution variables
+      include_vars:
+        file: ../var/{{ ansible_os_family }}.yml
+  roles:
     - { role: clone-repository, project: "opnfv/releng-xci", repo: "{{ OPNFV_RELENG_GIT_URL }}", dest: "{{ OPNFV_RELENG_PATH }}", version: "{{ OPNFV_RELENG_VERSION }}" }
     - { role: clone-repository, project: "openstack/openstack-ansible-openstack_openrc", repo: "{{ OPENSTACK_OSA_OPENRC_GIT_URL }}", dest: "{{ OPENSTACK_OSA_OPENRC_PATH }}", version: "master" }
 - hosts: localhost
index da47825..283aadc 100644 (file)
@@ -9,6 +9,7 @@
 ##############################################################################
 - hosts: opnfv
   remote_user: root
+  become: yes
   vars_files:
     - ../var/flavor-vars.yml
     - ../var/opnfv.yml
         file: ../var/{{ ansible_os_family }}.yml
   roles:
     - role: remove-folders
+
+- hosts: opnfv
+  remote_user: root
+  vars_files:
+    - ../var/flavor-vars.yml
+    - ../var/opnfv.yml
+  pre_tasks:
+    - name: Load distribution variables
+      include_vars:
+        file: ../var/{{ ansible_os_family }}.yml
+  roles:
     - { role: clone-repository, project: "opnfv/releng-xci", repo: "{{ OPNFV_RELENG_GIT_URL }}", dest: "{{ OPNFV_RELENG_PATH }}", version: "{{ OPNFV_RELENG_VERSION }}" }
     - { role: clone-repository, project: "openstack/openstack-ansible", repo: "{{ OPENSTACK_OSA_GIT_URL }}", dest: "{{ OPENSTACK_OSA_PATH }}", version: "{{ OPENSTACK_OSA_VERSION }}" }