xci: env-vars: Bump Ansible version to 2.3.2.0 77/42077/8
authorMarkos Chandras <mchandras@suse.de>
Fri, 15 Sep 2017 15:48:45 +0000 (16:48 +0100)
committerMarkos Chandras <mchandras@suse.de>
Fri, 15 Sep 2017 16:56:36 +0000 (17:56 +0100)
Now that bifrost uses virtual env for Ansible we can go ahead and
bump the Ansible version to match the one from OSA so we can make use of
the latest features. Furthremore, we stop passing ANSIBLE_VERBOSITY to
the command line since it's an environment variable so Ansible already
knows about it.

Change-Id: I52d9a211fc0ced1f7830f6945b2943f35d38109b
Signed-off-by: Markos Chandras <mchandras@suse.de>
bifrost/scripts/bifrost-provision.sh
xci/config/env-vars
xci/config/user-vars
xci/xci-deploy.sh

index 0cca82d..dab55f7 100755 (executable)
@@ -14,7 +14,6 @@ export PYTHONUNBUFFERED=1
 SCRIPT_HOME="$(cd "$(dirname "$0")" && pwd)"
 BIFROST_HOME=$SCRIPT_HOME/..
 ANSIBLE_INSTALL_ROOT=${ANSIBLE_INSTALL_ROOT:-/opt/stack}
-ANSIBLE_VERBOSITY=${ANSIBLE_VERBOSITY-"-vvvv"}
 ENABLE_VENV="false"
 USE_DHCP="false"
 USE_VENV="true"
@@ -98,12 +97,10 @@ cd $BIFROST_HOME/playbooks
 
 # Syntax check of dynamic inventory test path
 for task in syntax-check list-tasks; do
-    ${ANSIBLE} ${ANSIBLE_VERBOSITY} \
-           -i inventory/localhost \
+    ${ANSIBLE} -i inventory/localhost \
            test-bifrost-create-vm.yaml \
            --${task}
-    ${ANSIBLE} ${ANSIBLE_VERBOSITY} \
-           -i inventory/localhost \
+    ${ANSIBLE} -i inventory/localhost \
            ${TEST_PLAYBOOK} \
            --${task} \
            -e testing_user=${TESTING_USER}
@@ -120,8 +117,7 @@ if [[ -e /etc/centos-release ]]; then
 fi
 
 # Create the VMS
-${ANSIBLE} ${ANSIBLE_VERBOSITY} \
-       -i inventory/localhost \
+${ANSIBLE} -i inventory/localhost \
        test-bifrost-create-vm.yaml \
        -e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
        -e test_vm_memory_size=${VM_MEMORY_SIZE} \
@@ -130,8 +126,7 @@ ${ANSIBLE} ${ANSIBLE_VERBOSITY} \
        -e ${INVENTORY_FILE_FORMAT}=${BAREMETAL_DATA_FILE}
 
 # Execute the installation and VM startup test
-${ANSIBLE} ${ANSIBLE_VERBOSITY} \
-    -i inventory/bifrost_inventory.py \
+${ANSIBLE} -i inventory/bifrost_inventory.py \
     ${TEST_PLAYBOOK} \
     -e use_cirros=${USE_CIRROS} \
     -e testing_user=${TESTING_USER} \
index 976eb66..d8e7124 100755 (executable)
@@ -12,9 +12,10 @@ export OPNFV_XCI_PATH=$OPNFV_RELENG_PATH/xci
 export XCI_FLAVOR_ANSIBLE_FILE_PATH=$OPNFV_XCI_PATH/file/$XCI_FLAVOR
 export CI_LOOP=${CI_LOOP:-daily}
 export JOB_NAME=${JOB_NAME:-false}
-# TODO: this currently matches to bifrost ansible version
-# there is perhaps better way to do this
-export XCI_ANSIBLE_PIP_VERSION=2.1.5.0
+# This currently matches to OSA Ansible version but it doesn't really
+# matter since bifrost and OSA will use the Ansible version they need.
+# Overall, it's better to use what OSA supports so we can use new features.
+export XCI_ANSIBLE_PIP_VERSION=2.3.2.0
 export ANSIBLE_HOST_KEY_CHECKING=False
 export DISTRO=${DISTRO:-ubuntu}
 export DIB_OS_RELEASE=${DIB_OS_RELEASE:-xenial}
index 709aa29..ecde6db 100755 (executable)
@@ -52,7 +52,7 @@ export OPNFV_OSA_PLAYBOOK=${OPNFV_OSA_PLAYBOOK:-"$OPENSTACK_OSA_PATH/playbooks/s
 #   ANSIBLE_VERBOSITY="-v"
 # or
 #   ANSIBLE_VERBOSITY="-vvvv"
-export ANSIBLE_VERBOSITY=${ANSIBLE_VERBOSITY-""}
+export ANSIBLE_VERBOSITY=${ANSIBLE_VERBOSITY:-""}
 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
index ad4317f..5a01772 100755 (executable)
@@ -91,7 +91,7 @@ fi
 echo "Info: Starting provisining VM nodes using openstack/bifrost"
 echo "-------------------------------------------------------------------------"
 cd $XCI_PATH/playbooks
-ansible-playbook $ANSIBLE_VERBOSITY -i inventory provision-vm-nodes.yml
+ansible-playbook -i inventory provision-vm-nodes.yml
 echo "-----------------------------------------------------------------------"
 echo "Info: VM nodes are provisioned!"
 source $OPENSTACK_BIFROST_PATH/env-vars
@@ -109,7 +109,7 @@ echo
 echo "Info: Configuring localhost for openstack-ansible"
 echo "-----------------------------------------------------------------------"
 cd $XCI_PATH/playbooks
-ansible-playbook $ANSIBLE_VERBOSITY -i inventory configure-localhost.yml
+ansible-playbook -i inventory configure-localhost.yml
 echo "-----------------------------------------------------------------------"
 echo "Info: Configured localhost host for openstack-ansible"
 
@@ -127,7 +127,7 @@ echo "Info: Configured localhost host for openstack-ansible"
 echo "Info: Configuring opnfv deployment host for openstack-ansible"
 echo "-----------------------------------------------------------------------"
 cd ${XCI_DEVEL_ROOT}
-ansible-playbook $ANSIBLE_VERBOSITY -i ${OPNFV_XCI_PATH}/playbooks/inventory ${OPNFV_XCI_PATH}/playbooks/configure-opnfvhost.yml
+ansible-playbook -i ${OPNFV_XCI_PATH}/playbooks/inventory ${OPNFV_XCI_PATH}/playbooks/configure-opnfvhost.yml
 echo "-----------------------------------------------------------------------"
 echo "Info: Configured opnfv deployment host for openstack-ansible"
 
@@ -146,7 +146,7 @@ if [[ $XCI_FLAVOR != "aio" ]]; then
     echo "Info: Configuring target hosts for openstack-ansible"
     echo "-----------------------------------------------------------------------"
     cd $OPNFV_XCI_PATH/playbooks
-    ansible-playbook $ANSIBLE_VERBOSITY -i inventory configure-targethosts.yml
+    ansible-playbook -i inventory configure-targethosts.yml
     echo "-----------------------------------------------------------------------"
     echo "Info: Configured target hosts"
 fi