Use Python 3 in NGINX Amplify when possible (#492)

This commit is contained in:
Alessandro Fael Garcia 2022-02-16 18:51:41 +01:00 committed by GitHub
parent e9dd4e1688
commit 8bd37716ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 27 deletions

View File

@ -9,7 +9,8 @@ BREAKING CHANGES:
FEATURES: FEATURES:
Backwards support for older versions of Ansible (e.g. Ansible `<2.12`). * Backwards support for older versions of Ansible (e.g. Ansible `<2.12`).
* Update NGINX Amplify repositories to use Python 3 when possible.
ENHANCEMENTS: ENHANCEMENTS:

View File

@ -130,17 +130,16 @@ Ubuntu:
### NGINX Amplify Agent ### NGINX Amplify Agent
```yaml ```yaml
Amazon Linux: Amazon Linux 2:
- 2017.09 - any
CentOS: CentOS:
- 7 - 7
Debian: Debian:
- jessie - buster (10)
- stretch - bullseye (11)
Red Hat: Red Hat:
- 7 - 8
Ubuntu: Ubuntu:
- xenial
- bionic - bionic
- focal - focal
``` ```

View File

@ -8,7 +8,7 @@
name: nginx-amplify-agent name: nginx-amplify-agent
state: present state: present
- name: Copy NGINX configurator agent configuration template - name: Copy NGINX Amplify configurator agent configuration template
copy: copy:
remote_src: true remote_src: true
src: /etc/amplify-agent/agent.conf.default src: /etc/amplify-agent/agent.conf.default

View File

@ -1,25 +1,8 @@
--- ---
- name: (Ubuntu 20.04) Add NGINX Amplify apt key
apt_key:
url: https://nginx.org/keys/nginx_signing.key
state: present
become: true
when: ansible_facts['distribution_release'] == "focal"
- name: (Debian/Ubuntu) Add NGINX Amplify agent repository - name: (Debian/Ubuntu) Add NGINX Amplify agent repository
apt_repository: apt_repository:
filename: nginx-amplify filename: nginx-amplify
repo: "deb [arch=amd64] https://packages.amplify.nginx.com/{{ ansible_facts['distribution'] | lower }}/ repo: "deb [arch=amd64 signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://packages.amplify.nginx.com/py3/{{ ansible_facts['distribution'] | lower }}/
{{ ansible_facts['distribution_release'] | lower }} amplify-agent" {{ ansible_facts['distribution_release'] | lower }} amplify-agent"
update_cache: true update_cache: true
mode: 0644 mode: 0644
when: ansible_facts['distribution_release'] != "focal"
- name: (Ubuntu 20.04) Add NGINX Amplify agent repository
apt_repository:
filename: nginx-amplify
repo: deb [arch=amd64] https://packages.amplify.nginx.com/py3/ubuntu focal amplify-agent
update_cache: true
mode: 0644
when: ansible_facts['distribution_release'] == "focal"

View File

@ -2,7 +2,7 @@
- name: (Amazon Linux/CentOS/RHEL) Add NGINX Amplify agent repository - name: (Amazon Linux/CentOS/RHEL) Add NGINX Amplify agent repository
yum_repository: yum_repository:
name: nginx-amplify name: nginx-amplify
baseurl: http://packages.amplify.nginx.com/{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn/', 'centos/') }}/$releasever/$basearch/ baseurl: https://packages.amplify.nginx.com/{{ (ansible_facts['distribution_major_version'] == "7") | ternary('', 'py3/') }}{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn', 'centos') }}/$releasever/$basearch/
description: NGINX Amplify Agent description: NGINX Amplify Agent
enabled: true enabled: true
gpgcheck: true gpgcheck: true