mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-08 21:03:29 +01:00
More travis funs
This commit is contained in:
parent
2dd1ca5abb
commit
4f60a0e03d
1 changed files with 10 additions and 2 deletions
12
.travis.yml
12
.travis.yml
|
@ -11,11 +11,19 @@ install:
|
|||
- pip install ansible
|
||||
|
||||
# Add ansible.cfg to pick up roles path.
|
||||
- "printf '[defaults]\nroles_path = ../\n' > ansible.cfg"
|
||||
- "{ echo '[defaults]'; echo 'roles_path = ../'; } >> ansible.cfg"
|
||||
|
||||
|
||||
script:
|
||||
# Check the roles syntax
|
||||
- "ansible-playbook -i tests/inventory tests/test.yml --syntax-check"
|
||||
|
||||
# Run the role
|
||||
- "ansible-playbook -i tests/inventory tests/test.yml --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
|
||||
| grep -q 'changed=0.*failed=0'
|
||||
&& (echo 'Idempotence test: pass' && exit 0)
|
||||
|| (echo 'Idempotence test: fail' && exit 1)
|
||||
|
|
Loading…
Reference in a new issue