Define an extra vars path and copy into playbooks 49/35749/3
authorYolanda Robla <yroblamo@redhat.com>
Fri, 2 Jun 2017 16:31:31 +0000 (18:31 +0200)
committerYolanda Robla <yroblamo@redhat.com>
Mon, 5 Jun 2017 10:27:46 +0000 (12:27 +0200)
This will allow to define the XCI_EXTRA_VARS_PATH, that can
contain group_vars/all (or any other valid files), and those
will be copied inside releng and bifrost playbooks.

Change-Id: I95e4b0bfb67f26bfa1eb10c97096784eb7f3a87a
Signed-Off-By: Yolanda Robla <yroblamo@redhat.com>
prototypes/xci/config/user-vars
prototypes/xci/playbooks/provision-vm-nodes.yml
prototypes/xci/var/opnfv.yml

index 5ed5396..fd11a58 100755 (executable)
@@ -56,3 +56,6 @@ export LOG_PATH=${LOG_PATH:-${XCI_DEVEL_ROOT}/opnfv/logs}
 export RUN_TEMPEST=${RUN_TEMPEST:-false}
 # Set this to to true to force XCI to re-create the target OS images
 export CLEAN_DIB_IMAGES=${CLEAN_DIB_IMAGES:-false}
+# Set this to a full path pointing to extra config files (containing
+# group_vars/all)
+export XCI_EXTRA_VARS_PATH=${XCI_EXTRA_VARS_PATH:-""}
index 8be36c7..92b5c55 100644 (file)
         delete: yes
       when:
         - OPNFV_RELENG_DEV_PATH != ""
+    - name: Copy extra vars to releng and bifrost
+      synchronize:
+        src: "{{ XCI_EXTRA_VARS_PATH }}"
+        dest: "{{ item }}"
+      with_items:
+        - "{{ OPNFV_RELENG_PATH }}/prototypes/xci/playbooks"
+        - "{{ OPENSTACK_BIFROST_PATH }}/playbooks/inventory"
+      when:
+        - XCI_EXTRA_VARS_PATH != ""
 
 - hosts: localhost
   connection: local
index 85f532a..aeaface 100644 (file)
@@ -27,3 +27,4 @@ XCI_LOOP: "{{ lookup('env','XCI_LOOP') }}"
 LOG_PATH: "{{ lookup('env','LOG_PATH') }}"
 OPNFV_HOST_IP: "{{ lookup('env','OPNFV_HOST_IP') }}"
 OPNFV_SSH_HOST_KEYS_PATH: "{{ lookup('env', 'OPNFV_SSH_HOST_KEYS_PATH') }}"
+XCI_EXTRA_VARS_PATH: "{{ lookup('env', 'XCI_EXTRA_VARS_PATH') }}"