From 14d5449ef8de17293f2524005d7c2262f0baa733 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 19 Sep 2017 21:59:25 +0100 Subject: xci: Gain elevated privileges to remove the XCI_DEVEL_ROOT directory 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 --- xci/file/aio/configure-opnfvhost.yml | 8 +++++++- xci/playbooks/configure-localhost.yml | 11 +++++++++++ xci/playbooks/configure-opnfvhost.yml | 12 ++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) (limited to 'xci') diff --git a/xci/file/aio/configure-opnfvhost.yml b/xci/file/aio/configure-opnfvhost.yml index 708ad618..5ef19326 100644 --- a/xci/file/aio/configure-opnfvhost.yml +++ b/xci/file/aio/configure-opnfvhost.yml @@ -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 diff --git a/xci/playbooks/configure-localhost.yml b/xci/playbooks/configure-localhost.yml index 10dd6946..aebde61e 100644 --- a/xci/playbooks/configure-localhost.yml +++ b/xci/playbooks/configure-localhost.yml @@ -9,6 +9,7 @@ ############################################################################## - hosts: localhost connection: local + become: yes vars_files: - ../var/opnfv.yml pre_tasks: @@ -17,6 +18,16 @@ 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 diff --git a/xci/playbooks/configure-opnfvhost.yml b/xci/playbooks/configure-opnfvhost.yml index da478255..283aadcf 100644 --- a/xci/playbooks/configure-opnfvhost.yml +++ b/xci/playbooks/configure-opnfvhost.yml @@ -9,6 +9,7 @@ ############################################################################## - hosts: opnfv remote_user: root + become: yes vars_files: - ../var/flavor-vars.yml - ../var/opnfv.yml @@ -18,6 +19,17 @@ 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 }}" } -- cgit 1.2.3-korg