forked from jdauphant/ansible-role-nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
31 lines (31 loc) · 1.19 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
---
language: python
python: "2.7"
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
- ansible-playbook -i inventory --syntax-check --list-tasks test.yml -e "role_name=ansible-role-nginx" -e "hosts_group=hosts_group"
- ansible-playbook -i inventory --connection=local --sudo -vvvv test.yml -u root -e "role_name=ansible-role-nginx" -e "hosts_group=localhost"
- >
ansible-playbook -i inventory --connection=local --sudo -vvvv test.yml -u root -e "role_name=ansible-role-nginx" -e "hosts_group=localhost"
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
- cat /etc/nginx/nginx.conf
- cat /etc/nginx/sites-enabled/default.conf
- cat /etc/nginx/sites-enabled/foo.conf
- cat /etc/nginx/sites-enabled/bar.conf
- cat /etc/nginx/conf.d/proxy.conf
- cat /etc/nginx/conf.d/upstream.conf
- cat /etc/nginx/conf.d/geo.conf
- cat /etc/nginx/conf.d/gzip.conf
- sudo cat /etc/nginx/auth_basic/demo
- sudo nginx -t
after_script:
- ls -l /etc/nginx
- ls -l /etc/nginx/*