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:
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:

View File

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

View File

@ -8,7 +8,7 @@
name: nginx-amplify-agent
state: present
- name: Copy NGINX configurator agent configuration template
- name: Copy NGINX Amplify configurator agent configuration template
copy:
remote_src: true
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
apt_repository:
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"
update_cache: true
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
yum_repository:
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
enabled: true
gpgcheck: true