xci: Ensure ansible is bootstrapped as last step 81/33781/2
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 25 Apr 2017 09:39:31 +0000 (11:39 +0200)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 25 Apr 2017 10:49:13 +0000 (12:49 +0200)
Role requirements file is used during ansible bootstrap on opnfv
host so we must ensure the right ansible role requirements is there
in advance.

Change-Id: I2c5a1edd82a51cbbe1469c31f37b5d638d32ec27
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
prototypes/xci/playbooks/configure-opnfvhost.yml

index 06e27e7..64fcef0 100644 (file)
       shell: "/bin/cp -rf {{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/user_variables.yml {{OPENSTACK_OSA_ETC_PATH}}"
     - name: copy cinder.yml
       shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/prototypes/xci/file/cinder.yml {{OPENSTACK_OSA_ETC_PATH}}/env.d"
-    - name: bootstrap ansible on opnfv host
-      command: "/bin/bash ./scripts/bootstrap-ansible.sh"
-      args:
-        chdir: "{{OPENSTACK_OSA_PATH}}"
-    - name: generate password token
-      command: "python pw-token-gen.py --file {{OPENSTACK_OSA_ETC_PATH}}/user_secrets.yml"
-      args:
-        chdir: "{{OPENSTACK_OSA_PATH}}/scripts"
     # TODO: We need to get rid of this as soon as the issue is fixed upstream
     - name: change the haproxy state from disable to enable
       replace:
       shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/prototypes/xci/file/setup-openstack.yml {{OPENSTACK_OSA_PATH}}/playbooks"
     - name: copy OPNFV role requirements
       shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/prototypes/xci/file/ansible-role-requirements.yml {{OPENSTACK_OSA_PATH}}"
+    - name: bootstrap ansible on opnfv host
+      command: "/bin/bash ./scripts/bootstrap-ansible.sh"
+      args:
+        chdir: "{{OPENSTACK_OSA_PATH}}"
+    - name: generate password token
+      command: "python pw-token-gen.py --file {{OPENSTACK_OSA_ETC_PATH}}/user_secrets.yml"
+      args:
+        chdir: "{{OPENSTACK_OSA_PATH}}/scripts"
 - hosts: localhost
   remote_user: root
   tasks: