-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
40 lines (33 loc) · 1.05 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
---
sudo: required
dist: trusty
language: "python"
python:
- 2.7
env:
- ANSIBLE_VERSION=2.1
- ANSIBLE_VERSION=2.2
before_install:
# Make sure everything's up to date.
- sudo apt-get update -qq
# Remove MySQL
- sudo apt-get remove --purge 'mysql*'
- sudo apt-get autoremove
- sudo apt-get autoclean
- sudo rm -rf /var/lib/mysql
- sudo truncate -s 0 /var/log/mysql/error.log
install:
- pip install ansible==$ANSIBLE_VERSION
- "{ echo '[defaults]'; echo 'roles_path = ../'; } >> ansible.cfg"
- ansible-galaxy install -r requirements.yml
script:
- "ansible-playbook -i tests/travis-inventory tests/travis-playbook.yml --syntax-check"
- "ansible-playbook -i tests/travis-inventory tests/travis-playbook.yml --connection=local --sudo"
- >
ansible-playbook -i tests/travis-inventory tests/travis-playbook.yml --connection=local --sudo
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
- sudo rm -f /etc/nginx/sites-enabled/default && sudo service nginx reload
- >
curl http://localhost/Main_Page