From c34d16f08f199765a3c8545a301f3f7219f491cf Mon Sep 17 00:00:00 2001 From: Leseb Date: Wed, 21 Jan 2015 16:17:40 +0100 Subject: [PATCH] Revert "Fix Travis run" --- .travis.yml | 6 +++--- dummy-ansible-hosts | 9 +++++++++ test.yml => tests/inventory | 0 tests/test.yml | 10 ++++++++++ 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 dummy-ansible-hosts rename test.yml => tests/inventory (100%) create mode 100644 tests/test.yml diff --git a/.travis.yml b/.travis.yml index 15468e179..00eac3abb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,14 +18,14 @@ install: script: # Check the role/playbook's syntax. - - "ansible-playbook -i inventory $SITE --syntax-check" + - "ansible-playbook -i tests/inventory tests/$SITE --syntax-check" # Run the role/playbook with ansible-playbook. - - "ansible-playbook -i inventory $SITE --connection=local --sudo" + - "ansible-playbook -i tests/inventory tests/$SITE --connection=local --sudo" # Run the role/playbook again, checking to make sure it's idempotent. - > - ansible-playbook -i inventory $SITE --connection=local --sudo + ansible-playbook -i tests/inventory tests/$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 new file mode 100644 index 000000000..0f9fca8fc --- /dev/null +++ b/dummy-ansible-hosts @@ -0,0 +1,9 @@ +# 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/test.yml b/tests/inventory similarity index 100% rename from test.yml rename to tests/inventory diff --git a/tests/test.yml b/tests/test.yml new file mode 100644 index 000000000..7b94da40e --- /dev/null +++ b/tests/test.yml @@ -0,0 +1,10 @@ +--- +- hosts: localhost + remote_user: root + roles: + - ceph-common + - ceph-mon + - ceph-osd + - ceph-mds + - ceph-radosgw + - haproxy