-
Notifications
You must be signed in to change notification settings - Fork 70
/
.travis.yml
31 lines (25 loc) · 981 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
---
language: python
python: "2.7"
env:
matrix:
- ANSIBLE_VERSION="1.9.4"
- ANSIBLE_VERSION="2.0.0.2"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq python-apt python-pycurl
install:
- pip install ansible=="$ANSIBLE_VERSION"
script:
- echo localhost > inventory
# Syntax check
- ansible-playbook -i inventory tests/test.yml --syntax-check
# Play test
- ansible-playbook -i inventory tests/test.yml --connection=local --sudo
# Run the play again to circumvent idempotence bug on travis
- ansible-playbook -i inventory tests/test.yml --connection=local --sudo --tags change_root_password
# Idempotence test
- ansible-playbook -i inventory tests/test.yml --connection=local --sudo > idempotence_out
- ./tests/idempotence_check.sh idempotence_out
# Test password changing
- ansible-playbook -i inventory tests/test.yml --connection=local --sudo -e "mysql_default_root_password='CHANGEME' mysql_root_password='CHANGED'"