Skip to content

Commit 894fe47

Browse files
authored
Add support for installing NGINX OSS in Amazon Linux (#435)
1 parent e42253f commit 894fe47

File tree

12 files changed

+91
-65
lines changed

12 files changed

+91
-65
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## 0.21.1 (Unreleased)
4+
5+
FEATURES:
6+
7+
Support installing NGINX OSS in Amazon Linux.
8+
9+
ENHANCEMENTS:
10+
11+
* Update the README and Ansible metadata matrix of supported distributions.
12+
* Update the Molecule tests to include the newly supported distributions and remove distributions that are no longer supported.
13+
314
## 0.21.0 (August 11, 2021)
415

516
BREAKING CHANGES:

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,26 +55,28 @@ The NGINX Ansible role supports all platforms supported by [NGINX Open Source](h
5555

5656
```yaml
5757
Alpine:
58-
- 3.10
5958
- 3.11
6059
- 3.12
6160
- 3.13
61+
- 3.14
62+
Amazon Linux:
63+
- 2
6264
CentOS:
6365
- 7.4+
6466
- 8
6567
Debian:
6668
- buster
69+
- bullseye
6770
Red Hat:
6871
- 7.4+
6972
- 8
7073
SUSE/SLES:
7174
- 12
7275
- 15
7376
Ubuntu:
74-
- xenial
7577
- bionic
7678
- focal
77-
- groovy
79+
- hirsute
7880
```
7981

8082
### NGINX Plus

meta/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,22 @@ galaxy_info:
2323
- name: Debian
2424
versions:
2525
- buster
26+
- bullseye
2627
- name: EL
2728
versions:
2829
- 7
2930
- 8
3031
- name: FreeBSD
3132
versions:
32-
- 11.2
33+
- 11.4
3334
- 12.1
35+
- 13
3436
- name: Ubuntu
3537
versions:
3638
- xenial
3739
- bionic
3840
- focal
39-
- groovy
41+
- hirsute
4042
- name: SLES
4143
versions:
4244
- 12

molecule/common/Dockerfile.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ ENV {{ var }} {{ value }}
1717
RUN \
1818
if [ $(command -v apt-get) ]; then \
1919
apt-get update \
20-
&& DEBIAN_FRONTEND=noninteractive apt-get install -y aptitude bash ca-certificates curl iproute2 python-apt python3 python3-apt procps sudo systemd systemd-sysv vim \
20+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y aptitude bash ca-certificates curl iproute2 python3 python3-apt procps sudo systemd systemd-sysv vim \
2121
&& apt-get clean; \
2222
elif [ $(command -v dnf) ]; then \
2323
dnf makecache \
2424
&& dnf --assumeyes install bash iproute sudo /usr/bin/dnf-3 /usr/bin/python3 /usr/bin/python3-config vim \
2525
&& dnf clean all; \
2626
elif [ $(command -v yum) ]; then \
2727
yum makecache fast \
28-
&& yum install -y bash iproute sudo /usr/bin/python /usr/bin/python2-config vim yum-plugin-ovl \
28+
&& yum install -y bash iproute initscripts sudo /usr/bin/python /usr/bin/python2-config vim yum-plugin-ovl \
2929
&& sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf \
3030
&& yum clean all; \
3131
elif [ $(command -v zypper) ]; then \

molecule/default/converge.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.19.8-r1"
7+
version: "=1.21.1-r1"
88
when: ansible_facts['os_family'] == "Alpine"
99
- name: Set repo if Debian
1010
set_fact:
11-
version: "=1.19.8-1~{{ ansible_facts['distribution_release'] }}"
11+
version: "=1.21.1-1~{{ ansible_facts['distribution_release'] }}"
1212
when: ansible_facts['os_family'] == "Debian"
1313
- name: Set repo if Red Hat
1414
set_fact:
15-
version: "-1.19.8-1.el{{ ansible_facts['distribution_major_version'] }}.ngx"
15+
version: "-1.21.1-1.{{ (ansible_facts['distribution']=='Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
1616
when: ansible_facts['os_family'] == "RedHat"
1717
- name: Enable NGINX @CentOS-AppStream dnf modules
1818
shell:

molecule/default/molecule.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ lint: |
66
yamllint .
77
ansible-lint --force-color
88
platforms:
9-
- name: alpine-3.10
10-
image: alpine:3.10
11-
dockerfile: ../common/Dockerfile.j2
12-
privileged: true
13-
volumes:
14-
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
15-
command: "/sbin/init"
169
- name: alpine-3.11
1710
image: alpine:3.11
1811
dockerfile: ../common/Dockerfile.j2
@@ -34,6 +27,20 @@ platforms:
3427
volumes:
3528
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
3629
command: "/sbin/init"
30+
- name: alpine-3.14
31+
image: alpine:3.14
32+
dockerfile: ../common/Dockerfile.j2
33+
privileged: true
34+
volumes:
35+
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
36+
command: "/sbin/init"
37+
- name: amazonlinux
38+
image: amazonlinux:2
39+
dockerfile: ../common/Dockerfile.j2
40+
privileged: true
41+
volumes:
42+
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
43+
command: "/usr/sbin/init"
3744
- name: centos-7
3845
image: centos:7
3946
dockerfile: ../common/Dockerfile.j2
@@ -55,8 +62,8 @@ platforms:
5562
volumes:
5663
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
5764
command: "/sbin/init"
58-
- name: ubuntu-xenial
59-
image: ubuntu:xenial
65+
- name: debian-bullseye
66+
image: debian:bullseye-slim
6067
dockerfile: ../common/Dockerfile.j2
6168
privileged: true
6269
volumes:

molecule/module/molecule.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ lint: |
66
yamllint .
77
ansible-lint --force-color
88
platforms:
9-
- name: alpine-3.10
10-
image: alpine:3.10
11-
dockerfile: ../common/Dockerfile.j2
12-
privileged: true
13-
volumes:
14-
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
15-
command: "/sbin/init"
169
- name: alpine-3.11
1710
image: alpine:3.11
1811
dockerfile: ../common/Dockerfile.j2
@@ -34,6 +27,20 @@ platforms:
3427
volumes:
3528
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
3629
command: "/sbin/init"
30+
- name: alpine-3.14
31+
image: alpine:3.14
32+
dockerfile: ../common/Dockerfile.j2
33+
privileged: true
34+
volumes:
35+
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
36+
command: "/sbin/init"
37+
- name: amazonlinux
38+
image: amazonlinux:2
39+
dockerfile: ../common/Dockerfile.j2
40+
privileged: true
41+
volumes:
42+
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
43+
command: "/usr/sbin/init"
3744
- name: centos-7
3845
image: centos:7
3946
dockerfile: ../common/Dockerfile.j2
@@ -55,8 +62,8 @@ platforms:
5562
volumes:
5663
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
5764
command: "/sbin/init"
58-
- name: ubuntu-xenial
59-
image: ubuntu:xenial
65+
- name: debian-bullseye
66+
image: debian:bullseye-slim
6067
dockerfile: ../common/Dockerfile.j2
6168
privileged: true
6269
volumes:

molecule/plus/converge.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
- cookie-flag
1818
- encrypted-session
1919
- geoip
20-
- geoip2
20+
- "{{ ansible_facts['distribution'] == 'Amazon' | ternary('', 'geoip2') }}"
2121
- headers-more
2222
- image-filter
2323
- lua
2424
- njs
25-
- opentracing
25+
- "{{ ansible_facts['distribution'] == 'Amazon' | ternary('', 'opentracing') }}"
2626
- passenger
2727
- perl
2828
- prometheus

molecule/plus/molecule.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ platforms:
3434
volumes:
3535
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
3636
command: "/sbin/init"
37+
- name: amazonlinux
38+
image: amazonlinux:2
39+
dockerfile: ../common/Dockerfile.j2
40+
privileged: true
41+
volumes:
42+
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
43+
command: "/usr/sbin/init"
3744
- name: centos-7
3845
image: centos:7
3946
dockerfile: ../common/Dockerfile.j2

molecule/source/molecule.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ lint: |
66
yamllint .
77
ansible-lint --force-color
88
platforms:
9-
- name: alpine-3.10
10-
image: alpine:3.10
11-
dockerfile: ../common/Dockerfile.j2
12-
privileged: true
13-
volumes:
14-
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
15-
command: "/sbin/init"
169
- name: alpine-3.11
1710
image: alpine:3.11
1811
dockerfile: ../common/Dockerfile.j2
@@ -34,6 +27,20 @@ platforms:
3427
volumes:
3528
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
3629
command: "/sbin/init"
30+
- name: alpine-3.14
31+
image: alpine:3.14
32+
dockerfile: ../common/Dockerfile.j2
33+
privileged: true
34+
volumes:
35+
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
36+
command: "/sbin/init"
37+
- name: amazonlinux
38+
image: amazonlinux:2
39+
dockerfile: ../common/Dockerfile.j2
40+
privileged: true
41+
volumes:
42+
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
43+
command: "/usr/sbin/init"
3744
- name: centos-7
3845
image: centos:7
3946
dockerfile: ../common/Dockerfile.j2
@@ -55,8 +62,8 @@ platforms:
5562
volumes:
5663
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
5764
command: "/sbin/init"
58-
- name: ubuntu-xenial
59-
image: ubuntu:xenial
65+
- name: debian-bullseye
66+
image: debian:bullseye-slim
6067
dockerfile: ../common/Dockerfile.j2
6168
privileged: true
6269
volumes:

0 commit comments

Comments
 (0)