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/playbooks/configure-opnfvhost.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'xci/playbooks/configure-opnfvhost.yml') 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 From 3a281e5c91bf05d94361af1ff5818657d92a1bfd Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 18 Sep 2017 15:50:16 +0100 Subject: xci: playbooks: Include distribution var files dynamically This is a continuation of I0a49e2ed8d811bb40a99612462752f8691133e0f We need to convert these two plays to include the variable files dynamically similar to the rest of the playbook. Change-Id: I43203651ccafb03e015bfe4d1b075a7ee96b5adc Signed-off-by: Markos Chandras --- xci/playbooks/configure-localhost.yml | 2 -- xci/playbooks/configure-opnfvhost.yml | 1 - xci/playbooks/provision-vm-nodes.yml | 4 +++- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'xci/playbooks/configure-opnfvhost.yml') diff --git a/xci/playbooks/configure-localhost.yml b/xci/playbooks/configure-localhost.yml index aebde61e..915d1959 100644 --- a/xci/playbooks/configure-localhost.yml +++ b/xci/playbooks/configure-localhost.yml @@ -32,7 +32,6 @@ - { role: clone-repository, project: "openstack/openstack-ansible-openstack_openrc", repo: "{{ OPENSTACK_OSA_OPENRC_GIT_URL }}", dest: "{{ OPENSTACK_OSA_OPENRC_PATH }}", version: "master" } - hosts: localhost connection: local - gather_facts: false vars_files: - ../var/opnfv.yml tasks: @@ -77,7 +76,6 @@ dest: "{{OPNFV_RELENG_PATH}}/xci/var" - hosts: localhost connection: local - gather_facts: false vars_files: - ../var/opnfv.yml tasks: diff --git a/xci/playbooks/configure-opnfvhost.yml b/xci/playbooks/configure-opnfvhost.yml index 283aadcf..84c0d827 100644 --- a/xci/playbooks/configure-opnfvhost.yml +++ b/xci/playbooks/configure-opnfvhost.yml @@ -150,7 +150,6 @@ shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> ../file/authorized_keys" - hosts: opnfv - gather_facts: no remote_user: root vars_files: - ../var/flavor-vars.yml diff --git a/xci/playbooks/provision-vm-nodes.yml b/xci/playbooks/provision-vm-nodes.yml index 3d88c5cb..81fc5755 100644 --- a/xci/playbooks/provision-vm-nodes.yml +++ b/xci/playbooks/provision-vm-nodes.yml @@ -83,9 +83,11 @@ connection: local become: yes vars_files: - - ../var/{{ ansible_os_family }}.yml - ../var/opnfv.yml tasks: + - name: Load distribution variables + include_vars: + file: ../var/{{ ansible_os_family }}.yml - name: destroy VM nodes created by previous deployment command: "/bin/bash ./scripts/destroy-env.sh" args: -- cgit 1.2.3-korg