forked from ftao/vpn-deploy-playbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (47 loc) · 1.87 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
language: python
python: "2.7"
sudo: required
dist: trusty
before_install:
# Remove MySQL.
- sudo apt-get -y purge 'mysql*'
- sudo apt-get -y autoremove
- sudo apt-get -y autoclean
- sudo rm -rf /var/lib/mysql
# - sudo truncate -s 0 /var/log/mysql/error.log
- sudo apt-get update -qq
install:
# Install Ansible.
- pip install ansible
- ansible-galaxy install --force -r requirements.yml
script:
# Check the role/playbook's syntax.
- >
ansible-playbook -i ansible_hosts.local *.yml --syntax-check
| grep -q 'ERROR'
&& (echo 'Test: fail' && exit 1)
|| (echo 'Test: pass' && exit 0)
# Run the role/playbook with ansible-playbook.
# test auth / radius /admin ui
- ansible-playbook -i ansible_hosts.local auth.yml -e mysql_root_password=root_pass_test --sudo
# test pptp
- ansible-playbook -i ansible_hosts.local pptp.yml --sudo
# test openvpn
- ansible-playbook -i ansible_hosts.local openvpn.yml --sudo
# test openvpn - another instance
- ansible-playbook -i ansible_hosts.local openvpn.yml -e openvpn_name=tcp_443 -e openvpn_port=1194 -e openvpn_proto=tcp --sudo
# test openvpn static mode
#- ansible-playbook -i ansible_hosts.local openvpn.yml -e openvpn_mode=static -e openvpn_name=static -e openvpn_port=1195 --sudo
# test pki
#- ansible-playbook -i ansible_hosts.local pki.yml --sudo
# test ipsec (include ikev1/ikev2/l2tp)
- ansible-playbook -i ansible_hosts.local ipsec.yml --sudo
# test openconnect server
- ansible-playbook -i ansible_hosts.local openconnect.yml --sudo
# test https proxy
- ansible-playbook -i ansible_hosts.local https-proxy.yml -e nghttp2_with_spdylay=true --sudo
# test china dns
# - ansible-playbook -i ansible_hosts.local chinadns.yml --sudo
# Requests to make sure web respond.
# - "curl --retry 3 --connect-timeout 5 --max-time 120 -s -o /dev/null http://localhost/"