forked from pmbauer/ansible-tarsnap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
25 lines (20 loc) · 626 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
language: python
python: "2.7"
before_install:
# Make sure everything's up to date.
- sudo apt-get update -qq
install:
# Install Ansible.
- pip install ansible
script:
# synax check run
- "ansible-playbook -i tests/travis_inventory tests/travis.yml --syntax-check"
# role executes first time without error
- "ansible-playbook -vvvv -i tests/travis_inventory tests/travis.yml"
# role idempotence
- >
ansible-playbook -i tests/travis_inventory tests/travis.yml
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)