Revert "Fix Travis run"

pull/195/head
Leseb 2015-01-21 16:17:40 +01:00
parent 5527cf71e6
commit c34d16f08f
4 changed files with 22 additions and 3 deletions

View File

@ -18,14 +18,14 @@ install:
script: script:
# Check the role/playbook's syntax. # 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. # 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. # 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' | grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0) && (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1) || (echo 'Idempotence test: fail' && exit 1)

View File

@ -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

10
tests/test.yml 100644
View File

@ -0,0 +1,10 @@
---
- hosts: localhost
remote_user: root
roles:
- ceph-common
- ceph-mon
- ceph-osd
- ceph-mds
- ceph-radosgw
- haproxy