summaryrefslogtreecommitdiffstats
path: root/prototypes
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-05-09 15:41:22 +0100
committerMarkos Chandras <mchandras@suse.de>2017-05-11 23:42:11 +0100
commit9cb8ab17a12852824a49b02e7b634e40467ad7e6 (patch)
treef9f57f443389cddbbccafcda98cb9d8757d0667f /prototypes
parent5ef62747c290944deabf801ccf9c8a2d0f7ec38a (diff)
prototypes: xci: provision-vm-nodes: Do not provision VMs as root.
There is no need to provision VM nodes as root. The only thing that we need to run as root is the destroy-env.sh script and for that we move it to its own play so we can use Ansible's become directive. Moreover, since this playbook operates on localhost we can use 'connection: local' so we don't have to execute everything via ssh and possibly speed up the whole process. Change-Id: Ia9efd5f30e95385b5cf193dde352f93551846c0e Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'prototypes')
-rw-r--r--prototypes/xci/playbooks/provision-vm-nodes.yml17
1 files changed, 16 insertions, 1 deletions
diff --git a/prototypes/xci/playbooks/provision-vm-nodes.yml b/prototypes/xci/playbooks/provision-vm-nodes.yml
index 9a32d0bfc..dad0184f1 100644
--- a/prototypes/xci/playbooks/provision-vm-nodes.yml
+++ b/prototypes/xci/playbooks/provision-vm-nodes.yml
@@ -8,7 +8,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
- hosts: localhost
- remote_user: root
+ connection: local
vars_files:
- ../var/{{ ansible_os_family }}.yml
- ../var/opnfv.yml
@@ -22,10 +22,25 @@
copy:
src: "{{ OPNFV_RELENG_PATH }}/prototypes/bifrost/"
dest: "{{ OPENSTACK_BIFROST_PATH }}"
+
+- hosts: localhost
+ connection: local
+ become: yes
+ vars_files:
+ - ../var/{{ ansible_os_family }}.yml
+ - ../var/opnfv.yml
+ tasks:
- name: destroy VM nodes created by previous deployment
command: "/bin/bash ./scripts/destroy-env.sh"
args:
chdir: "{{ OPENSTACK_BIFROST_PATH }}"
+
+- hosts: localhost
+ connection: local
+ vars_files:
+ - ../var/{{ ansible_os_family }}.yml
+ - ../var/opnfv.yml
+ tasks:
- name: create and provision VM nodes for the flavor {{ XCI_FLAVOR }}
command: "/bin/bash ./scripts/bifrost-provision.sh"
args: