From 48ac9579b69972d6aab352662fb7edb61db62ae4 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Tue, 10 Jan 2017 16:56:07 -0600 Subject: [PATCH] tests: copy purge-cluster.yml to root of ceph-ansible There is an Ansible bug which makes the playbook fail when we are running a playbook from the non-git root directory. The real problem is that the ansible.cfg is not honoured and we are including variable from roles//defaults/main.yml The fix is too copy the purge cluster playbook on the git root directory and execute it. Signed-off-by: Andrew Schoen --- tox.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index cc53543e2..288124103 100644 --- a/tox.ini +++ b/tox.ini @@ -7,6 +7,7 @@ whitelist_externals = vagrant bash pip + cp passenv=* setenv= ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config @@ -46,8 +47,8 @@ commands= testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests - # use infrastructure-playbooks/purge-cluster.yml to purge the cluster - purge_cluster_collocated: ansible-playbook -vv -i {changedir}/hosts {toxinidir}/infrastructure-playbooks/purge-cluster.yml --extra-vars="ireallymeanit=yes fetch_directory={changedir}/fetch" + purge_cluster_collocated: cp {toxinidir}/infrastructure-playbooks/purge-cluster.yml {toxinidir}/purge-cluster.yml + purge_cluster_collocated: ansible-playbook -vv -i {changedir}/hosts {toxinidir}/purge-cluster.yml --extra-vars="ireallymeanit=yes fetch_directory={changedir}/fetch" # set up the cluster again purge_cluster_collocated: ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars="fetch_directory={changedir}/fetch" # test that the cluster can be redeployed in a healthy state -- 2.39.5