Skip to content

Commit 55c2f53

Browse files
authored
Add support for Ubuntu Focal (#258)
1 parent 19fcdf0 commit 55c2f53

File tree

14 files changed

+136
-63
lines changed

14 files changed

+136
-63
lines changed

.travis.yml

Lines changed: 56 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,65 @@ services:
44
- docker
55
jobs:
66
include:
7-
- name: "Install Specific Version Test - Debian"
8-
env: scenario=default
9-
- name: "Install Specific Version Test - Alpine"
10-
env: scenario=default_alpine
11-
- name: "Install Specific Version Test - CentOS"
12-
env: scenario=default_centos
13-
- name: "Install Modules Test - Debian"
14-
env: scenario=module
15-
- name: "Install Modules Test - Alpine"
16-
env: scenario=module_alpine
17-
- name: "Install Modules Test - CentOS"
18-
env: scenario=module_centos
19-
- name: "Install Stable Branch and Push Configuration Test - Debian"
20-
env: scenario=stable_push
21-
- name: "Install Stable Branch and Push Configuration Test - Alpine"
22-
env: scenario=stable_push_alpine
23-
- name: "Install Stable Branch and Push Configuration Test - CentOS"
24-
env: scenario=stable_push_centos
25-
- name: "Use Template Setting Test - Debian"
26-
env: scenario=template
27-
- name: "Use Template Setting Test - Alpine"
28-
env: scenario=template_alpine
29-
- name: "Use Template Setting Test - CentOS"
30-
env: scenario=template_centos
31-
- name: "Install Unit Test - Debian"
32-
env: scenario=unit
33-
- name: "Install Unit Test - Alpine"
34-
env: scenario=unit_alpine
35-
- name: "Install Unit Test - CentOS"
36-
env: scenario=unit_centos
37-
- name: "Install from Source Test - Debian"
38-
env: scenario=source
39-
- name: "Install from Source Test - Alpine"
40-
env: scenario=source_alpine
41-
- name: "Install from Source Test - CentOS"
42-
env: scenario=source_centos
7+
- name: "Install Specific Version - Debian/Ubuntu"
8+
env:
9+
scenario: default
10+
- name: "Install Specific Version - Alpine"
11+
env:
12+
scenario: default_alpine
13+
- name: "Install Specific Version - CentOS"
14+
env:
15+
scenario: default_centos
16+
- name: "Install Modules - Debian/Ubuntu"
17+
env:
18+
scenario: module
19+
- name: "Install Modules - Alpine"
20+
env:
21+
scenario: module_alpine
22+
- name: "Install Modules - CentOS"
23+
env:
24+
scenario: module_centos
25+
- name: "Install Stable Branch and Push Configuration - Debian/Ubuntu"
26+
env:
27+
scenario: stable_push
28+
- name: "Install Stable Branch and Push Configuration - Alpine"
29+
env:
30+
scenario: stable_push_alpine
31+
- name: "Install Stable Branch and Push Configuration - CentOS"
32+
env:
33+
scenario: stable_push_centos
34+
- name: "Use Template Setting - Debian/Ubuntu"
35+
env:
36+
scenario: template
37+
- name: "Use Template Setting - Alpine"
38+
env:
39+
scenario: template_alpine
40+
- name: "Use Template Setting - CentOS"
41+
env:
42+
scenario: template_centos
43+
- name: "Install Unit - Debian/Ubuntu"
44+
env:
45+
scenario: unit
46+
- name: "Install Unit - Alpine"
47+
env:
48+
scenario: unit_alpine
49+
- name: "Install Unit - CentOS"
50+
env:
51+
scenario: unit_centos
52+
- name: "Install from Source - Debian/Ubuntu"
53+
env:
54+
scenario: source
55+
- name: "Install from Source - Alpine"
56+
env:
57+
scenario: source_alpine
58+
- name: "Install from Source - CentOS"
59+
env:
60+
scenario: source_centos
4361
before_install:
4462
- sudo apt-get -qq update
4563
install:
46-
- pip install ansible==2.9.6
47-
- pip install molecule[docker]>=3.0.0
64+
- pip install ansible==2.9.9
65+
- pip install molecule[docker]==3.0.4
4866
- pip install testinfra
4967
- pip install ansible-lint
5068
- pip install flake8

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Ubuntu:
7272
versions:
7373
- xenial
7474
- bionic
75+
- focal
7576
```
7677
7778
**NGINX Plus**
@@ -88,7 +89,7 @@ Amazon Linux:
8889
- 2018.03
8990
Amazon Linux 2:
9091
versions:
91-
- LTS
92+
- any
9293
CentOS:
9394
versions:
9495
- 6.5+
@@ -119,6 +120,7 @@ Ubuntu:
119120
versions:
120121
- xenial
121122
- bionic
123+
- focal
122124
```
123125
124126
**NGINX Amplify Agent**
@@ -148,33 +150,31 @@ RedHat:
148150
**NGINX Unit**
149151
150152
```yaml
151-
CentOS:
153+
Amazon Linux:
152154
versions:
153-
- 6
154-
- 7
155-
RedHat:
155+
- 2018.03
156+
Amazon Linux 2:
157+
versions:
158+
- any
159+
CentOS:
156160
versions:
157161
- 6
158162
- 7
163+
- 8
159164
Debian:
160165
versions:
161-
- jessie
162166
- stretch
163167
- buster
168+
RedHat:
169+
versions:
170+
- 6
171+
- 7
172+
- 8
164173
Ubuntu:
165174
versions:
166175
- xenial
167176
- bionic
168-
Amazon Linux:
169-
versions:
170-
- 2018.03
171-
Amazon Linux 2:
172-
versions:
173-
- 2
174-
FreeBSD:
175-
versions:
176-
- 10
177-
- 11
177+
- focal
178178
```
179179
180180
Role Variables

defaults/main/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ nginx_install_from: nginx_repository
3939
# Options represent whether to install from source also
4040
# or to install from packages (default). These only apply
4141
# if 'nginx_install_from' is set to 'source'
42-
# For the tools, true means we will isntall from a package
42+
# For the tools, true means we will install from a package
4343
# and false means install from source.
4444
# 'nginx_install_source_build_tools' will install compiler
4545
# and build tools from packages. If false, you need to have

meta/main.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ galaxy_info:
1111
platforms:
1212
- name: Alpine
1313
versions:
14-
- all
14+
- any
1515
- name: Amazon
1616
versions:
17-
- Candidate
17+
- 2018.03
18+
- name: Amazon Linux 2
19+
versions:
20+
- any
1821
- name: Debian
1922
versions:
20-
- jessie
2123
- stretch
2224
- buster
2325
- name: EL
@@ -32,6 +34,7 @@ galaxy_info:
3234
versions:
3335
- xenial
3436
- bionic
37+
- focal
3538
- name: SLES
3639
versions:
3740
- 12

molecule/common/Dockerfile.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ENV {{ var }} {{ value }}
1717
RUN \
1818
if [ $(command -v apt-get) ]; then \
1919
apt-get update \
20-
&& apt-get install -y python3 sudo bash ca-certificates iproute2 python3-apt aptitude systemd systemd-sysv procps curl \
20+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y python3 sudo bash ca-certificates iproute2 python3-apt aptitude systemd systemd-sysv procps curl \
2121
&& apt-get clean; \
2222
elif [ $(command -v dnf) ]; then \
2323
dnf makecache \

molecule/common/playbook_default.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
pre_tasks:
55
- name: "Set repo if Alpine"
66
set_fact:
7-
version: "=1.17.8-r1"
7+
version: "=1.17.10-r1"
88
when: ansible_os_family == "Alpine"
99
- name: "Set repo if Debian"
1010
set_fact:
11-
version: "=1.17.8-1~{{ ansible_distribution_release }}"
11+
version: "=1.17.10-1~{{ ansible_distribution_release }}"
1212
when: ansible_os_family == "Debian"
1313
- name: "Set repo if RedHat"
1414
set_fact:
15-
version: "-1.17.8-1.el{{ ansible_distribution_major_version }}.ngx"
15+
version: "-1.17.10-1.el{{ ansible_distribution_major_version }}.ngx"
1616
when: ansible_os_family == "RedHat"
1717
roles:
1818
- role: ansible-role-nginx
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
- name: Verify
3+
hosts: all
4+
tasks:
5+
- name: "Test NGINX is installed"
6+
assert:
7+
- name: "Test NGINX service is running and enabled"
8+
assert:
9+
- name: "Test NGINX is listening"
10+
assert:

molecule/default/molecule.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ platforms:
3535
volumes:
3636
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
3737
command: "/sbin/init"
38+
- name: ubuntu-focal
39+
image: ubuntu:focal
40+
dockerfile: ../common/Dockerfile.j2
41+
privileged: true
42+
volumes:
43+
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
44+
command: "/sbin/init"
3845
provisioner:
3946
name: ansible
4047
playbooks:

molecule/module/molecule.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ platforms:
3535
volumes:
3636
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
3737
command: "/sbin/init"
38+
- name: ubuntu-focal
39+
image: ubuntu:focal
40+
dockerfile: ../common/Dockerfile.j2
41+
privileged: true
42+
volumes:
43+
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
44+
command: "/sbin/init"
3845
provisioner:
3946
name: ansible
4047
playbooks:

molecule/source/molecule.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ platforms:
3535
volumes:
3636
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
3737
command: "/sbin/init"
38+
- name: ubuntu-focal
39+
image: ubuntu:focal
40+
dockerfile: ../common/Dockerfile.j2
41+
privileged: true
42+
volumes:
43+
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
44+
command: "/sbin/init"
3845
provisioner:
3946
name: ansible
4047
playbooks:

0 commit comments

Comments
 (0)