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