Skip to content

Commit b779d0d

Browse files
committed
add verify
1 parent 2c91d61 commit b779d0d

File tree

3 files changed

+35
-12
lines changed

3 files changed

+35
-12
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ os: linux
44
jobs:
55
include:
66
- dist: Focal
7-
- dist: Bionic
87

98
notifications:
109
email:
@@ -22,5 +21,4 @@ install:
2221
- ansible-playbook travisbook.yml
2322

2423
script:
25-
- ansible-lint travisbook.yml || true
26-
24+
- ./.travis/verify.sh

.travis/verify.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
#!/bin/bash
3+
set -o errexit
4+
5+
verify_syntax(){
6+
ansible-lint travisbook.yml || true
7+
}
8+
9+
verify_lsws(){
10+
curl -sIk http://localhost:7080/ | grep -i LiteSpeed
11+
if [ ${?} = 0 ]; then
12+
echo '[O] https://localhost:7080/'
13+
else
14+
echo '[X] https://localhost:7080/'
15+
exit 1
16+
fi
17+
}
18+
19+
verify_wordpress(){
20+
curl -siL http://localhost/ | grep -i WordPress
21+
if [ ${?} = 0 ]; then
22+
echo '[O] https://localhost/'
23+
else
24+
echo '[X] https://localhost/'
25+
exit 1
26+
fi
27+
}
28+
29+
main(){
30+
verify_syntax
31+
verify_lsws
32+
verify_wordpress
33+
}

roles/common/tasks/main.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,4 @@
22
- name: Install unzip
33
raw: test -e /usr/bin/unzip || apt install -y unzip
44
changed_when: false
5-
tags: [ system ]
6-
7-
- name: Make sure pymysql is present
8-
become: true
9-
pip:
10-
name: "{{ item }}"
11-
state: present
12-
with_items:
13-
- pymysql
5+
tags: [ system ]

0 commit comments

Comments
 (0)