Remove scalars where I don't need em (#323)
This commit is contained in:
parent
903693e67f
commit
5c7cfb05fb
@ -1,8 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: "Configure NGINX Amplify agent repository"
|
- name: "Configure NGINX Amplify agent repository"
|
||||||
include_tasks: "{{ role_path }}/tasks/amplify/setup-{{ ansible_facts['os_family'] | lower }}.yml"
|
include_tasks: "{{ role_path }}/tasks/amplify/setup-{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
when: ansible_facts['os_family'] == "Debian"
|
when: ansible_facts['os_family'] in ['Debian', 'RedHat']
|
||||||
or ansible_facts['os_family'] == "Redhat"
|
|
||||||
|
|
||||||
- name: "Install NGINX Amplify agent"
|
- name: "Install NGINX Amplify agent"
|
||||||
package:
|
package:
|
||||||
|
@ -2,9 +2,8 @@
|
|||||||
- 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: >-
|
repo: "deb [arch=amd64] https://packages.amplify.nginx.com/{{ ansible_facts['distribution'] | lower }}/
|
||||||
deb [arch=amd64] https://packages.amplify.nginx.com/
|
{{ ansible_facts['distribution_release'] | lower }} amplify-agent"
|
||||||
{{ ansible_facts['distribution'] | lower }}/ {{ ansible_facts['distribution_release'] | lower }} amplify-agent
|
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: ansible_facts['distribution_release'] != "focal"
|
when: ansible_facts['distribution_release'] != "focal"
|
||||||
|
@ -17,6 +17,5 @@
|
|||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
loop: >-
|
loop: "{{ nginx_config_files.results | default('') | map(attribute='files') | sum(start=[]) | map(attribute='path') | list
|
||||||
{{ nginx_config_files.results | default('') | map(attribute='files') | sum(start=[]) | map(attribute='path') | list
|
+ nginx_cleanup_config_files | default('') }}"
|
||||||
+ nginx_cleanup_config_files | default('') }}
|
|
||||||
|
@ -130,8 +130,8 @@
|
|||||||
url: "https://ftp.pcre.org/pub/pcre/{{ pcre_version }}.tar.gz"
|
url: "https://ftp.pcre.org/pub/pcre/{{ pcre_version }}.tar.gz"
|
||||||
dest: "/tmp/{{ pcre_version }}.tar.gz"
|
dest: "/tmp/{{ pcre_version }}.tar.gz"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
validate_certs: >-
|
validate_certs: "{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '=='))
|
||||||
{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '==')) | ternary('no', 'yes') }}
|
| ternary('no', 'yes') }}"
|
||||||
register: pcre_source
|
register: pcre_source
|
||||||
|
|
||||||
- name: "Unpack PCRE dependency"
|
- name: "Unpack PCRE dependency"
|
||||||
@ -189,8 +189,8 @@
|
|||||||
url: "https://zlib.net/{{ zlib_version }}.tar.gz"
|
url: "https://zlib.net/{{ zlib_version }}.tar.gz"
|
||||||
dest: "/tmp/{{ zlib_version }}.tar.gz"
|
dest: "/tmp/{{ zlib_version }}.tar.gz"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
validate_certs: >-
|
validate_certs: "{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '=='))
|
||||||
{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '==')) | ternary('no', 'yes') }}
|
| ternary('no', 'yes') }}"
|
||||||
register: zlib_source
|
register: zlib_source
|
||||||
|
|
||||||
- name: "Unpack ZLib dependency"
|
- name: "Unpack ZLib dependency"
|
||||||
@ -248,8 +248,8 @@
|
|||||||
url: "https://www.openssl.org/source/{{ openssl_version }}.tar.gz"
|
url: "https://www.openssl.org/source/{{ openssl_version }}.tar.gz"
|
||||||
dest: "/tmp/{{ openssl_version }}.tar.gz"
|
dest: "/tmp/{{ openssl_version }}.tar.gz"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
validate_certs: >-
|
validate_certs: "{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '=='))
|
||||||
{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '==')) | ternary('no', 'yes') }}
|
| ternary('no', 'yes') }}"
|
||||||
register: openssl_source
|
register: openssl_source
|
||||||
|
|
||||||
- name: "Unpack OpenSSL dependency"
|
- name: "Unpack OpenSSL dependency"
|
||||||
@ -282,8 +282,8 @@
|
|||||||
uri:
|
uri:
|
||||||
url: https://trac.nginx.org/nginx/browser
|
url: https://trac.nginx.org/nginx/browser
|
||||||
return_content: yes
|
return_content: yes
|
||||||
validate_certs: >-
|
validate_certs: "{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '=='))
|
||||||
{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '==')) | ternary('no', 'yes') }}
|
| ternary('no', 'yes') }}"
|
||||||
register: nginx_versions
|
register: nginx_versions
|
||||||
|
|
||||||
- name: "Set NGINX mainline version"
|
- name: "Set NGINX mainline version"
|
||||||
@ -322,8 +322,8 @@
|
|||||||
url: "https://nginx.org/download/{{ nginx_download_name }}.tar.gz"
|
url: "https://nginx.org/download/{{ nginx_download_name }}.tar.gz"
|
||||||
dest: "/tmp/{{ nginx_download_name }}.tar.gz"
|
dest: "/tmp/{{ nginx_download_name }}.tar.gz"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
validate_certs: >-
|
validate_certs: "{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '=='))
|
||||||
{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '==')) | ternary('no', 'yes') }}
|
| ternary('no', 'yes') }}"
|
||||||
register: nginx_source
|
register: nginx_source
|
||||||
|
|
||||||
- name: "Unpack NGINX"
|
- name: "Unpack NGINX"
|
||||||
|
@ -6,9 +6,8 @@
|
|||||||
|
|
||||||
- name: "Set NGINX Plus repository"
|
- name: "Set NGINX Plus repository"
|
||||||
set_fact:
|
set_fact:
|
||||||
repository: >-
|
repository: "{{ nginx_repository |
|
||||||
{{ nginx_repository |
|
default(nginx_plus_default_repository[(ansible_facts['distribution'] == 'Amazon') | ternary('amazon', ansible_facts['os_family'] | lower)]) }}"
|
||||||
default(nginx_plus_default_repository[(ansible_facts['distribution'] == 'Amazon') | ternary('amazon', ansible_facts['os_family'] | lower)]) }}
|
|
||||||
|
|
||||||
- name: "Install NGINX from repository"
|
- name: "Install NGINX from repository"
|
||||||
include_tasks: "{{ role_path }}/tasks/plus/install-{{ ansible_facts['os_family'] | lower }}.yml"
|
include_tasks: "{{ role_path }}/tasks/plus/install-{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
|
@ -19,23 +19,18 @@ nginx_default_signing_key:
|
|||||||
|
|
||||||
# Default NGINX Open Source repositories
|
# Default NGINX Open Source repositories
|
||||||
nginx_default_repository:
|
nginx_default_repository:
|
||||||
alpine: >-
|
alpine: "https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
||||||
https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
| ternary('mainline/', '') }}alpine/v{{ ansible_facts['distribution_version'] | regex_search('^[0-9]+\\.[0-9]+') }}/main"
|
||||||
| ternary('mainline/', '') }}alpine/v{{ ansible_facts['distribution_version'] | regex_search('^[0-9]+\.[0-9]+') }}/main
|
|
||||||
debian:
|
debian:
|
||||||
- >-
|
- "deb [arch=amd64] https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
||||||
deb [arch=amd64] https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
| ternary('mainline/', '') }}{{ ansible_facts['distribution'] | lower }}/ {{ ansible_facts['distribution_release'] }} nginx"
|
||||||
| ternary('mainline/', '') }}{{ ansible_facts['distribution'] | lower }}/ {{ ansible_facts['distribution_release'] }} nginx
|
- "deb-src https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
||||||
- >-
|
| ternary('mainline/', '') }}{{ ansible_facts['distribution'] | lower }}/ {{ ansible_facts['distribution_release'] }} nginx"
|
||||||
deb-src https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
redhat: "https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
||||||
| ternary('mainline/', '') }}{{ ansible_facts['distribution'] | lower }}/ {{ ansible_facts['distribution_release'] }} nginx
|
| ternary('mainline/', '') }}{{ (ansible_facts['distribution'] == 'CentOS')
|
||||||
redhat: >-
|
| ternary('centos', 'rhel') }}/{{ ansible_facts['distribution_major_version'] }}/$basearch/"
|
||||||
https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
suse: "https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
||||||
| ternary('mainline/', '') }}{{ (ansible_facts['distribution'] == "CentOS")
|
| ternary('mainline/', '') }}sles/{{ ansible_facts['distribution_major_version'] }}"
|
||||||
| ternary('centos', 'rhel') }}/{{ ansible_facts['distribution_major_version'] }}/$basearch/
|
|
||||||
suse: >-
|
|
||||||
https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
|
||||||
| ternary('mainline/', '') }}sles/{{ ansible_facts['distribution_major_version'] }}
|
|
||||||
|
|
||||||
# Default NGINX Plus repositories
|
# Default NGINX Plus repositories
|
||||||
nginx_plus_default_repository:
|
nginx_plus_default_repository:
|
||||||
|
Loading…
Reference in New Issue
Block a user