-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.travis.yml
32 lines (24 loc) · 821 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
26
27
28
29
30
31
32
---
language: python
python: "2.7"
dist: trusty
before_install:
- sudo apt-get update
install:
# Install Ansible.
- sudo apt-get install python-pip
- sudo pip install ansible
- sudo apt-get -y install strace
- ansible-playbook --version
script:
# Check the role/playbook's syntax.
- ansible-playbook -i inventories/local.ini site.yml --syntax-check
# Run the role/playbook with ansible-playbook.
- ansible-playbook -i inventories/local.ini site.yml
# properly idempotence should require no changes, but the travis vm seems to
# have trouble running chrony...
- >
ansible-playbook -i inventories/local.ini site.yml
| grep -q 'changed=0 .*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)