From: Andrew Schoen Date: Tue, 10 Jan 2017 22:56:07 +0000 (-0600) Subject: tests: copy purge-cluster.yml to root of ceph-ansible X-Git-Tag: v2.2.0rc1~69^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=48ac9579b69972d6aab352662fb7edb61db62ae4;p=ceph-ansible.git 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 --- 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