-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
32 lines (29 loc) · 958 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"
sudo: required
dist: trusty
services:
- docker
before_install:
- sudo apt-get update -qq
install:
- sudo pip install docker
- sudo apt-get install -y sshpass software-properties-common python-software-properties
- sudo apt-add-repository -y ppa:ansible/ansible
- sudo apt-get update -qq
- sudo apt-get install -y ansible
- echo -e 'localhost ansible_connection=local' > tests/inventory
- echo -e '[defaults]\nroles_path = ../\nhostfile = ./tests/inventory' > ansible.cfg
- sudo rm /usr/bin/python && sudo ln -s /usr/bin/python2.7 /usr/bin/python
- ansible --version
script:
- ansible-playbook --syntax-check tests/role.yml
- ansible-playbook -v --diff tests/role.yml
- >
ansible-playbook tests/role.yml
| grep -q 'failed=0'
&& (echo 'Fail test: pass' && exit 0)
|| (echo 'Fail test: fail' && exit 1)
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/