This repository has been archived by the owner on Aug 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 302
/
.travis.yml
38 lines (38 loc) · 1.54 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
---
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-lint
- ansible --version
script:
- ansible-lint tasks/main.yml
- echo localhost > inventory
- ansible-playbook -i inventory --syntax-check --list-tasks test/test.yml -e "role_name=ansible-role-nginx" -e "hosts_group=hosts_group"
- ansible-playbook -i inventory --connection=local --become -vvvv test/test.yml -u root -e "role_name=ansible-role-nginx" -e "hosts_group=localhost"
- >
ansible-playbook -i inventory --connection=local --become -vvvv test/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/sites-enabled/custom_bar.conf
- grep 'server_name bar.example.com;' /etc/nginx/sites-enabled/custom_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
- cat /etc/nginx/conf.d/cloudflare.conf
- cat /etc/nginx/snippets/error_pages.conf
- sudo cat /etc/nginx/auth_basic/demo
- sudo nginx -t
after_script:
- ls -l /etc/nginx
- ls -l /etc/nginx/*
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/