]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: copy purge-cluster.yml to root of ceph-ansible
authorAndrew Schoen <aschoen@redhat.com>
Tue, 10 Jan 2017 22:56:07 +0000 (16:56 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 10 Jan 2017 22:56:07 +0000 (16:56 -0600)
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/<role>/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 <aschoen@redhat.com>
tox.ini

diff --git a/tox.ini b/tox.ini
index cc53543e2c8e7f5409dd62ba3b7b6d14df4a37cf..288124103f84db75863c18283b4077d5a9bbe786 100644 (file)
--- 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