From 965df5579cdd1b241103f17df95eedb3d3d47dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 21 Jan 2015 16:15:55 +0100 Subject: [PATCH] Fix Travis run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix travis run and effectively test the playbooks. Signed-off-by: Sébastien Han --- .travis.yml | 6 +++--- dummy-ansible-hosts | 9 --------- tests/inventory => test.yml | 0 tests/test.yml | 10 ---------- 4 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 dummy-ansible-hosts rename tests/inventory => test.yml (100%) delete mode 100644 tests/test.yml diff --git a/.travis.yml b/.travis.yml index 00eac3abb..15468e179 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,14 +18,14 @@ install: script: # Check the role/playbook's syntax. - - "ansible-playbook -i tests/inventory tests/$SITE --syntax-check" + - "ansible-playbook -i inventory $SITE --syntax-check" # Run the role/playbook with ansible-playbook. - - "ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo" + - "ansible-playbook -i inventory $SITE --connection=local --sudo" # Run the role/playbook again, checking to make sure it's idempotent. - > - ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo + ansible-playbook -i inventory $SITE --connection=local --sudo | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) diff --git a/dummy-ansible-hosts b/dummy-ansible-hosts deleted file mode 100644 index 0f9fca8fc..000000000 --- a/dummy-ansible-hosts +++ /dev/null @@ -1,9 +0,0 @@ -# Dummy ansible host file -# Used for syntax check -# Before committing code please run: ansible-playbook --syntax-check site.yml -i dummy-ansible-hosts -[mons] -127.0.0.1 -[osds] -127.0.0.1 -[mdss] -127.0.0.1 diff --git a/tests/inventory b/test.yml similarity index 100% rename from tests/inventory rename to test.yml diff --git a/tests/test.yml b/tests/test.yml deleted file mode 100644 index 7b94da40e..000000000 --- a/tests/test.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - ceph-common - - ceph-mon - - ceph-osd - - ceph-mds - - ceph-radosgw - - haproxy