-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
51 lines (39 loc) · 1.93 KB
/
.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
language: python
python:
- 3.7.4
sudo: required
env:
- ANSIBLE_VERSION=latest
- ANSIBLE_VERSION=2.9
branches:
only:
- master
install:
# Install Ansible.
- if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible; else pip install ansible==$ANSIBLE_VERSION; fi
# Add ansible.cfg to pick up roles path.
- printf "[defaults]\nroles_path = ../" > ansible.cfg
script:
# Check the role/playbook's syntax.
- ansible-playbook -i tests/inventory tests/test.yml --syntax-check
# Run the role/playbook with ansible-playbook.
- ansible-playbook -i tests/inventory tests/test.yml --connection=local --become -vvvv
# Run the role/playbook again, checking to make sure it's idempotent.
- >
ansible-playbook -i tests/inventory tests/test.yml --connection=local --become
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
# Check timezone
- cat /etc/timezone | grep Etc/UTC || exit 1
matrix:
fast_finish: true
notifications:
email: false
webhooks: https://galaxy.ansible.com/api/v1/notifications/
hipchat:
rooms:
secure: z9Uf8jArCGUTqv4+faOWKOhxINzOM+v6lDdOoLBtx5m2+kXq6+YSJuOmVq/2+8ygcShIYTIWd21PEgck1quVHtQDaTNblxzQL5AQSSkCdoVHZp2gro6TLVJJfKbOYRreE4DerA74Q7l67lNvjzlvTvV0ncDrZWbXHhw6hDuMZuctUrHrVri2EaMVoU7PiLTnSP8dv2wQHS2lTnA6SQXF19PGx+XS5QPAGVP7kQcN5mp0TwaF1VNBFjnR1E6y1AesGCswid7gmZ/NvdZ5rjjlJq14XXZTMLuHQeFMZp1RWuf1IkHwXjeGqp00IE8TDgP3+R7YQkt9gbOK1lXAxAWYcAFo5tFxtkKbJLXorjeuXQzet1s5GxDY2gcoxwehNNWou9/jfT0aSgGtsb4mvXUcJVVw50oBldx6hA/cykwtRqdvG+uzlRoscs5sVOgPhkFS1a/ykpN64eEz/GgfjQW82UPOKtnphLnwrVZX7ODknuJk0fbnZhBLAOJz4npDtrrM0NeRVBnvqBwc/kFUhYrRGdplcmVHYNkzhekrZ/jJ/n0KoLvbY4tc+PSgbglUBSV6Yd4yseUx041YaGKGhQEDtDlILKV6Bt4H5wXPYJ1Cr+BSnLIiQ/LY8Y5Ea9+lIBDTEgG9JMwRcvI6ljziw0YTb288Hi8vUn7h2A4UQ5mQb/g=
template:
- "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} %{build_url}"
notify: true