From 6ffaea37a3ab94610719ce83b862af5764266c7c Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Tue, 10 Sep 2019 12:23:19 -0400 Subject: [PATCH] tox-update: set the ansible.cfg path before update During an upgrade we're installation the platform with the stable-3.2 branch. But the ansible configuration is still using the file from the current branch which could have some differences. Instead we can override the ANSIBLE_CONFIG environment variable with the stable-3.2 commands. Signed-off-by: Dimitri Savineau (cherry picked from commit a8740026ad3f1503e45add78630cb63bbb413cfc) --- tox-update.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tox-update.ini b/tox-update.ini index 9ca7fa156..b6b7642b2 100644 --- a/tox-update.ini +++ b/tox-update.ini @@ -48,13 +48,13 @@ commands= git clone -b stable-3.2 --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt - ansible-playbook -vv -i {changedir}/{env:INVENTORY} {envdir}/tmp/ceph-ansible/tests/functional/setup.yml + bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg ansible-playbook -vv -i {changedir}/{env:INVENTORY} {envdir}/tmp/ceph-ansible/tests/functional/setup.yml' # configure lvm - ansible-playbook -vv -i {changedir}/{env:INVENTORY} {envdir}/tmp/ceph-ansible/tests/functional/lvm_setup.yml --extra-vars "osd_scenario=lvm" + bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg ansible-playbook -vv -i {changedir}/{env:INVENTORY} {envdir}/tmp/ceph-ansible/tests/functional/lvm_setup.yml --extra-vars "osd_scenario=lvm"' # deploy the cluster - ansible-playbook -vv -i {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/{env:INVENTORY} {envdir}/tmp/ceph-ansible/{env:PLAYBOOK:site.yml.sample} --extra-vars "\ + bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg ansible-playbook -vv -i {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/{env:INVENTORY} {envdir}/tmp/ceph-ansible/{env:PLAYBOOK:site.yml.sample} --extra-vars "\ delegate_facts_host={env:DELEGATE_FACTS_HOST:True} \ fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \ ceph_stable_release={env:CEPH_STABLE_RELEASE:luminous} \ @@ -62,7 +62,7 @@ commands= ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \ copy_admin_key={env:COPY_ADMIN_KEY:False} \ - " + "' pip install -r {toxinidir}/tests/requirements.txt ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/infrastructure-playbooks/rolling_update.yml --extra-vars "\