-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
31 lines (27 loc) · 909 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
---
#TODO: test on both RHEL, Ubuntu
language: python
python: "2.7"
#before_install:
# # Make sure everything's up to date.
# - sudo apt-get update -qq
install:
#- pip install ansible
#- "printf '[defaults]\\nroles_path = ../' > ansible.cfg"
- pip install ansible-lint
#before_script:
# - echo localhost > inventory
# - ansible-galaxy install --role-file requirements.yml
script:
### Check syntax
#- ansible-playbook -i tests/inventory tests/test.yml --syntax-check
### Check Lint
- ansible-lint -v $(find tests -name *yml) -x ANSIBLE0010
### Test run
#- "ansible-playbook -i tests/inventory tests/test.yml --connection=local --sudo"
### Test idempotence
#- >
# ansible-playbook -i tests/inventory tests/test.yml --connection=local --sudo
# | grep -q 'changed=0.*failed=0'
# && (echo 'Idempotence test: pass' && exit 0)
# || (echo 'Idempotence test: fail' && exit 1)