-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
39 lines (33 loc) · 1.31 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
sudo: required
dist: trusty
language: python
python:
- "2.7"
services:
- docker
env:
global:
- PATH="/usr/bin:$PATH"
before_install:
# Ansible doesn't play well with virtualenv
- deactivate
- sudo apt-get update -qq
- sudo apt-get install -y --allow-unauthenticated -o Dpkg::Options::="--force-confnew" docker-ce
- sudo apt-get install -y --allow-unauthenticated sshpass software-properties-common python-software-properties
# software-properties-common for ubuntu 14.04
# python-software-properties for ubuntu 12.04
install:
- sudo pip install docker
- sudo pip install ansible
- ansible --version
- ansible-galaxy install -v -f -r tests/requirements.yml
script:
- ansible-playbook -i tests/inventory tests/playbook.yml --syntax-check
- ansible-playbook -i tests/inventory tests/playbook.yml --list-tasks
- ansible-playbook -i tests/inventory tests/playbook.yml --connection=local --become
- 'ansible-playbook -i tests/inventory tests/playbook.yml --connection=local --become | grep -q "changed=0.*failed=0" &&
(echo "Idempotence test: pass" && exit 0) || (echo "Idempotence test: fail" && exit 1)'
after_script:
- ansible-playbook -i tests/inventory tests/playbook_cleanup.yml --connection=local --become
# notifications:
# webhooks: https://galaxy.ansible.com/api/v1/notifications/