Skip to content

Commit 8bd3771

Browse files
authored
Use Python 3 in NGINX Amplify when possible (#492)
1 parent e9dd4e1 commit 8bd3771

File tree

5 files changed

+10
-27
lines changed

5 files changed

+10
-27
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ BREAKING CHANGES:
99

1010
FEATURES:
1111

12-
Backwards support for older versions of Ansible (e.g. Ansible `<2.12`).
12+
* Backwards support for older versions of Ansible (e.g. Ansible `<2.12`).
13+
* Update NGINX Amplify repositories to use Python 3 when possible.
1314

1415
ENHANCEMENTS:
1516

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,16 @@ Ubuntu:
130130
### NGINX Amplify Agent
131131

132132
```yaml
133-
Amazon Linux:
134-
- 2017.09
133+
Amazon Linux 2:
134+
- any
135135
CentOS:
136136
- 7
137137
Debian:
138-
- jessie
139-
- stretch
138+
- buster (10)
139+
- bullseye (11)
140140
Red Hat:
141-
- 7
141+
- 8
142142
Ubuntu:
143-
- xenial
144143
- bionic
145144
- focal
146145
```

tasks/amplify/install-amplify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
name: nginx-amplify-agent
99
state: present
1010

11-
- name: Copy NGINX configurator agent configuration template
11+
- name: Copy NGINX Amplify configurator agent configuration template
1212
copy:
1313
remote_src: true
1414
src: /etc/amplify-agent/agent.conf.default

tasks/amplify/setup-debian.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,8 @@
11
---
2-
3-
- name: (Ubuntu 20.04) Add NGINX Amplify apt key
4-
apt_key:
5-
url: https://nginx.org/keys/nginx_signing.key
6-
state: present
7-
become: true
8-
when: ansible_facts['distribution_release'] == "focal"
9-
102
- name: (Debian/Ubuntu) Add NGINX Amplify agent repository
113
apt_repository:
124
filename: nginx-amplify
13-
repo: "deb [arch=amd64] https://packages.amplify.nginx.com/{{ ansible_facts['distribution'] | lower }}/
5+
repo: "deb [arch=amd64 signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://packages.amplify.nginx.com/py3/{{ ansible_facts['distribution'] | lower }}/
146
{{ ansible_facts['distribution_release'] | lower }} amplify-agent"
157
update_cache: true
168
mode: 0644
17-
when: ansible_facts['distribution_release'] != "focal"
18-
19-
- name: (Ubuntu 20.04) Add NGINX Amplify agent repository
20-
apt_repository:
21-
filename: nginx-amplify
22-
repo: deb [arch=amd64] https://packages.amplify.nginx.com/py3/ubuntu focal amplify-agent
23-
update_cache: true
24-
mode: 0644
25-
when: ansible_facts['distribution_release'] == "focal"

tasks/amplify/setup-redhat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- name: (Amazon Linux/CentOS/RHEL) Add NGINX Amplify agent repository
33
yum_repository:
44
name: nginx-amplify
5-
baseurl: http://packages.amplify.nginx.com/{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn/', 'centos/') }}/$releasever/$basearch/
5+
baseurl: https://packages.amplify.nginx.com/{{ (ansible_facts['distribution_major_version'] == "7") | ternary('', 'py3/') }}{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn', 'centos') }}/$releasever/$basearch/
66
description: NGINX Amplify Agent
77
enabled: true
88
gpgcheck: true

0 commit comments

Comments
 (0)