Skip to content

Commit c85368e

Browse files
authored
Add experimental support for Ubuntu focal (#292)
1 parent b089b03 commit c85368e

File tree

12 files changed

+86
-84
lines changed

12 files changed

+86
-84
lines changed

defaults/main/amplify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# Install NGINX Amplify.
33
# Use your NGINX Amplify API key.
4-
# Requires access to either the NGINX stub status or the NGINX Plus REST API.
4+
# Requires access to either the NGINX stub_status or the NGINX Plus REST API.
55
# Default is null.
66
nginx_amplify_enable: false
77
nginx_amplify_api_key: null

defaults/main/template.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,10 @@ nginx_http_template:
312312
# custom_options: []
313313
# custom_options: []
314314

315-
# Enable NGINX status data.
316-
# Will enable 'stub_status' in NGINX Open Source and 'status' in NGINX Plus.
317-
# Note - 'status' has been deprecated since NGINX Plus R13.
315+
# Enable NGINX 'stub_status' data.
316+
# Will enable 'stub_status' in NGINX Open Source.
317+
# Note - NGINX Plus 'status' has been deprecated since NGINX Plus R13.
318+
# Use the Rest API parameter instead.
318319
# Default is false.
319320
nginx_status_enable: false
320321
nginx_status_template_file: http/status.conf.j2

tasks/amplify/setup-debian.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@
33
apt_repository:
44
filename: nginx-amplify
55
repo: deb [arch=amd64] http://packages.amplify.nginx.com/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release|lower }} amplify-agent
6+
when: ansible_distribution_release != "focal"
7+
8+
- name: "(Install: Debian/Ubuntu) Add NGINX Amplify Agent Repository"
9+
apt_repository:
10+
filename: nginx-amplify
11+
repo: deb [arch=amd64] https://packages.amplify.nginx.com/py3/ubuntu focal amplify-agent
12+
when: ansible_distribution_release == "focal"

tasks/keys/setup-keys.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
when: ansible_os_family == "Alpine"
55
tags: nginx_apkkey
66

7-
- name: "(Setup: Keys) Debian"
7+
- name: "(Setup: Keys) Debian/Ubuntu"
88
include_tasks: "{{ role_path }}/tasks/keys/apt-key.yml"
99
when: ansible_os_family == "Debian"
1010
tags: nginx_aptkey
1111

12-
- name: "(Setup: Keys) RedHat/Suse"
12+
- name: "(Setup: Keys) CentOS/RedHat/Suse"
1313
include_tasks: "{{ role_path }}/tasks/keys/rpm-key.yml"
1414
when: ansible_os_family == "RedHat"
1515
or ansible_os_family == "Suse"

tasks/modules/install-geoip.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
- name: "(Install: CentOS) Install GeoIP Required CentOS Dependencies"
33
yum:
4-
name:
5-
- epel-release
4+
name: epel-release
65
when: ansible_distribution == "CentOS"
76

87
- name: "(Install: All OSs) Install NGINX Open Source GeoIP Module"

tasks/modules/install-modules.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
11
---
2-
- include_tasks: "{{ role_path }}/tasks/modules/install-njs.yml"
2+
- name: "(Install: All OSs) Install NGINX JavaScript Module"
3+
include_tasks: "{{ role_path }}/tasks/modules/install-njs.yml"
34
when: nginx_modules.njs | default(false)
45

5-
- include_tasks: "{{ role_path }}/tasks/modules/install-perl.yml"
6+
- name: "(Install: All OSs) Install NGINX Perl Module"
7+
include_tasks: "{{ role_path }}/tasks/modules/install-perl.yml"
68
when: nginx_modules.perl | default(false)
79

8-
- include_tasks: "{{ role_path }}/tasks/modules/install-geoip.yml"
10+
- name: "(Install: All OSs) Install NGINX GeoIP Module"
11+
include_tasks: "{{ role_path }}/tasks/modules/install-geoip.yml"
912
when:
1013
- nginx_modules.geoip | default(false)
1114
- ansible_os_family != "RedHat"
1215
- ansible_distribution_major_version != "8"
1316

14-
- include_tasks: "{{ role_path }}/tasks/modules/install-image-filter.yml"
17+
- name: "(Install: All OSs) Install NGINX Image Filter Module"
18+
include_tasks: "{{ role_path }}/tasks/modules/install-image-filter.yml"
1519
when: nginx_modules.image_filter | default(false)
1620

17-
- include_tasks: "{{ role_path }}/tasks/modules/install-rtmp.yml"
21+
- name: "(Install: All OSs) Install NGINX RTMP Module"
22+
include_tasks: "{{ role_path }}/tasks/modules/install-rtmp.yml"
1823
when:
1924
- nginx_modules.rtmp | default(false)
2025
- nginx_type == "plus"
2126

22-
- include_tasks: "{{ role_path }}/tasks/modules/install-xslt.yml"
27+
- name: "(Install: All OSs) Install NGINX XSLT Module"
28+
include_tasks: "{{ role_path }}/tasks/modules/install-xslt.yml"
2329
when: nginx_modules.xslt | default(false)
2430

25-
- include_tasks: "{{ role_path }}/tasks/modules/install-waf.yml"
31+
- name: "(Install: All OSs) Install NGINX WAF Module"
32+
include_tasks: "{{ role_path }}/tasks/modules/install-waf.yml"
2633
when:
2734
- nginx_modules.waf | default(false)
2835
- nginx_type == "plus"

tasks/opensource/install-oss-bsd.yml

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
- name: "(Install: FreeBSD) Update ports"
2+
- name: "(Install: FreeBSD) Update Ports"
33
block:
4-
54
- name: "(Install: FreeBSD) Fetch Ports"
65
command: portsnap fetch --interactive
76
args:
@@ -11,71 +10,63 @@
1110
command: portsnap extract
1211
args:
1312
creates: /usr/ports
14-
1513
when:
16-
- ansible_system == 'FreeBSD'
14+
- ansible_system == "FreeBSD"
1715
- nginx_bsd_update_ports
1816

1917
- name: "(Install: FreeBSD)"
2018
block:
21-
22-
- name: "(Install: FreeBSD) Install NGINX package"
19+
- name: "(Install: FreeBSD) Install NGINX Package"
2320
pkgng:
2421
name: "www/nginx{{ nginx_version | default('') }}"
2522
state: "{{ nginx_state }}"
2623
when: nginx_bsd_install_packages
2724
notify: "(Handler: All OSs) Start NGINX"
2825

29-
- name: "(Install: FreeBSD) Install NGINX port"
26+
- name: "(Install: FreeBSD) Install NGINX Port"
3027
portinstall:
3128
name: "www/nginx{{ nginx_version | default('') }}"
3229
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
3330
state: "{{ nginx_state }}"
3431
when: not nginx_bsd_install_packages
3532
notify: "(Handler: All OSs) Start NGINX"
36-
37-
when: ansible_system == 'FreeBSD'
33+
when: ansible_system == "FreeBSD"
3834

3935
- name: "(Install: OpenBSD)"
4036
block:
41-
42-
- name: "(Install: OpenBSD) Install NGINX package"
37+
- name: "(Install: OpenBSD) Install NGINX Package"
4338
openbsd_pkg:
4439
name: "nginx{{ nginx_version | default('') }}"
4540
build: false
4641
state: "{{ nginx_state }}"
4742
when: nginx_bsd_install_packages
4843
notify: "(Handler: All OSs) Start NGINX"
4944

50-
- name: "(Install: OpenBSD) Install NGINX port"
45+
- name: "(Install: OpenBSD) Install NGINX Port"
5146
openbsd_pkg:
5247
name: "nginx{{ nginx_version | default('') }}"
5348
build: true
5449
state: "{{ nginx_state }}"
5550
when: not nginx_bsd_install_packages
5651
notify: "(Handler: All OSs) Start NGINX"
57-
58-
when: ansible_system == 'OpenBSD'
52+
when: ansible_system == "OpenBSD"
5953

6054
- name: "(Install: NetBSD)"
6155
block:
62-
63-
- name: "(Install: NetBSD) Install NGINX package"
56+
- name: "(Install: NetBSD) Install NGINX Package"
6457
command: "pkg_add www/nginx{{ nginx_version | default('') }}"
6558
when: nginx_bsd_install_packages
6659
notify: "(Handler: All OSs) Start NGINX"
6760

68-
- name: "(Install: NetBSD) Install NGINX port"
61+
- name: "(Install: NetBSD) Install NGINX Port"
6962
fail:
7063
msg: "{{ ansible_system }} Install NGINX port not implemented."
7164
when: not nginx_bsd_install_packages
72-
73-
when: ansible_system == 'NetBSD'
65+
when: ansible_system == "NetBSD"
7466

7567
- name: "(Install: DragonFlyBSD)"
7668
block:
77-
78-
- name: "(Install: DragonFlyBSD) Install NGINX package"
69+
- name: "(Install: DragonFlyBSD) Install NGINX Package"
7970
command: "pkg install www/nginx{{ nginx_version | default('') }}"
8071
when: nginx_bsd_install_packages
8172
notify: "(Handler: All OSs) Start NGINX"
@@ -84,12 +75,10 @@
8475
fail:
8576
msg: "{{ ansible_system }} Install NGINX port not implemented."
8677
when: not nginx_bsd_install_packages
87-
88-
when: ansible_system == 'DragonFlyBSD'
78+
when: ansible_system == "DragonFlyBSD"
8979

9080
- name: "(Install: HardenedBSD)"
9181
block:
92-
9382
- name: "(Install: HardenedBSD) Install NGINX package"
9483
command: "pkg install www/nginx{{ nginx_version | default('') }}"
9584
when: nginx_bsd_install_packages
@@ -99,5 +88,4 @@
9988
fail:
10089
msg: "{{ ansible_system }} Install NGINX port not implemented."
10190
when: not nginx_bsd_install_packages
102-
103-
when: ansible_system == 'HardenedBSD'
91+
when: ansible_system == "HardenedBSD"

tasks/opensource/install-oss-linux.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: "(Install: Linux) Configure NGINX repo"
2+
- name: "(Install: Linux) Configure NGINX Repository"
33
include_tasks: "{{ role_path }}/tasks/opensource/setup-{{ ansible_os_family | lower }}.yml"
44
when:
55
- ansible_os_family == "Alpine"
@@ -8,17 +8,17 @@
88
or ansible_os_family == "Suse"
99
- nginx_install_from == "nginx_repository"
1010

11-
- name: "(Install: Linux) Modify Service for Systemd"
11+
- name: "(Install: Linux) Modify Service For Systemd"
1212
include_tasks: "{{ role_path }}/tasks/prerequisites/setup-systemd.yml"
1313
when:
1414
- ansible_service_mgr == "systemd"
1515
- nginx_service_modify
1616

17-
- name: "(Install: Linux) Install NGINX from source"
17+
- name: "(Install: Linux) Install NGINX From Source"
1818
include_tasks: "{{ role_path }}/tasks/opensource/setup-source.yml"
1919
when: nginx_install_from == "source"
2020

21-
- name: "(Install: Linux) Install NGINX package"
21+
- name: "(Install: Linux) Install NGINX Package"
2222
package:
2323
name: "nginx{{ nginx_version | default('') }}"
2424
state: "{{ nginx_state }}"

tasks/opensource/setup-source.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
update_cache: true
6969
when: ansible_os_family == "Alpine"
7070

71-
- name: "(Install: Alpine) Enable openrc"
71+
- name: "(Install: Alpine) Enable OpenRC"
7272
copy:
7373
content: ""
7474
dest: /run/openrc/softlevel
@@ -85,12 +85,12 @@
8585
path: /tmp/{{ pcre_version }}
8686
register: pcre_result
8787

88-
- name: "(Install: Linux) Check For zlib Install"
88+
- name: "(Install: Linux) Check For ZLib Install"
8989
stat:
9090
path: /tmp/{{ zlib_version }}
9191
register: zlib_result
9292

93-
- name: "(Install: Linux) Check For openssl Install"
93+
- name: "(Install: Linux) Check For OpenSSL Install"
9494
stat:
9595
path: /tmp/{{ openssl_version }}
9696
register: openssl_result
@@ -152,39 +152,39 @@
152152
- not pcre_result.stat.exists
153153
- not nginx_install_source_pcre
154154

155-
- name: "(Install: Centos/RHEL) Install zlib Dependency From Package"
155+
- name: "(Install: Centos/RHEL) Install ZLib Dependency From Package"
156156
yum:
157157
name: zlib-devel
158158
update_cache: true
159159
when:
160160
- nginx_install_source_zlib
161161
- ansible_os_family == "RedHat"
162162

163-
- name: "(Install: Debian/Ubuntu) Install zlib Dependency From Package"
163+
- name: "(Install: Debian/Ubuntu) Install ZLib Dependency From Package"
164164
apt:
165165
name: zlib1g-dev
166166
update_cache: true
167167
when:
168168
- nginx_install_source_zlib
169169
- ansible_os_family == "Debian"
170170

171-
- name: "(Install: Alpine) Install zlib Dependency From Package"
171+
- name: "(Install: Alpine) Install ZLib Dependency From Package"
172172
apk:
173173
name: zlib-dev
174174
update_cache: true
175175
when:
176176
- nginx_install_source_zlib
177177
- ansible_os_family == "Alpine"
178178

179-
- name: "(Install: Linux) Install zlib Dependency From Source"
179+
- name: "(Install: Linux) Install ZLib Dependency From Source"
180180
block:
181-
- name: "(Install: Linux) Download zlib Dependency"
181+
- name: "(Install: Linux) Download ZLib Dependency"
182182
get_url:
183183
url: "http://zlib.net/{{ zlib_version }}.tar.gz"
184184
dest: "/tmp/{{ zlib_version }}.tar.gz"
185185
register: zlib_source
186186

187-
- name: "(Install: Linux) Unpack zlib Dependency"
187+
- name: "(Install: Linux) Unpack ZLib Dependency"
188188
unarchive:
189189
copy: no
190190
dest: /tmp/
@@ -197,11 +197,11 @@
197197
chdir: "/tmp/{{ zlib_version }}"
198198
register: zlib_configure
199199

200-
- name: "(Install: Linux) Make zlib Dependency"
200+
- name: "(Install: Linux) Make ZLib Dependency"
201201
make:
202202
chdir: "/tmp/{{ zlib_version }}"
203203

204-
- name: "(Install: Linux) Install zlib Dependency"
204+
- name: "(Install: Linux) Install ZLib Dependency"
205205
make:
206206
chdir: "/tmp/{{ zlib_version }}"
207207
target: install

tasks/prerequisites/setup-freebsd.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
---
22
- name: "(Setup: FreeBSD) Install Required Dependencies"
33
block:
4-
54
- name: "(Setup: FreeBSD) Install Extra Package(s)"
65
pkgng:
76
name: "{{ nginx_freebsd_extra_packages }}"
8-
state: present
9-
when: nginx_bsd_install_packages|bool
7+
when: nginx_bsd_install_packages | bool
108

119
- name: "(Setup: FreeBSD) Install Extra Port(s)"
1210
portinstall:
1311
name: "{{ item }}"
1412
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
15-
state: present
1613
loop: "{{ nginx_freebsd_extra_packages }}"
17-
when: not nginx_bsd_install_packages|bool
14+
when: not nginx_bsd_install_packages | bool

0 commit comments

Comments
 (0)