Add 'nginx_manage_repo' feature flag and defaults (#420)
Co-authored-by: Jurgen Verhasselt <hello@sjugge.be> Co-authored-by: Jurgen Verhasselt <sjugge@inuits.eu>
This commit is contained in:
parent
f1272ef80e
commit
3a63b9acf6
@ -4,6 +4,7 @@
|
||||
|
||||
FEATURES:
|
||||
|
||||
* Add a `nginx_manage_repo` feature flag which allows disabling NGINX repo management by this role.
|
||||
* Add a `nginx_install_epel_release` feature flag which allows epel-release to not be installed by this role if so desired.
|
||||
|
||||
## 0.20.0 (June 9, 2021)
|
||||
|
@ -34,6 +34,12 @@ nginx_type: opensource
|
||||
# Default is present.
|
||||
nginx_state: present
|
||||
|
||||
# Specify whether or not you want to manage the NGINX repositories.
|
||||
# Using 'true' will manage NGINX repositories.
|
||||
# Using 'false' will not manage the NGINX repositories, allowing them to be managed through other means.
|
||||
# Default is true
|
||||
nginx_manage_repo: true
|
||||
|
||||
# Specify repository origin for NGINX Open Source.
|
||||
# Options are 'nginx_repository', 'source' or 'os_repository'.
|
||||
# Only works if 'nginx_type' is set to 'opensource'.
|
||||
|
@ -4,6 +4,7 @@
|
||||
path: /etc/apk/repositories
|
||||
insertafter: EOF
|
||||
line: "{{ nginx_repository | default(nginx_default_repository_alpine) }}"
|
||||
when: nginx_manage_repo | bool
|
||||
|
||||
- name: (Alpine Linux) Install NGINX
|
||||
apk:
|
||||
|
@ -6,6 +6,7 @@
|
||||
update_cache: true
|
||||
mode: 0644
|
||||
loop: "{{ nginx_repository | default(nginx_default_repository_debian) }}"
|
||||
when: nginx_manage_repo | bool
|
||||
|
||||
- name: (Debian/Ubuntu) Install NGINX
|
||||
apt:
|
||||
|
@ -7,7 +7,9 @@
|
||||
enabled: true
|
||||
gpgcheck: true
|
||||
mode: 0644
|
||||
when: ansible_facts['distribution_major_version'] is version('8', '<')
|
||||
when:
|
||||
- ansible_facts['distribution_major_version'] is version('8', '<')
|
||||
- nginx_manage_repo | bool
|
||||
|
||||
- name: (CentOS/RHEL 8) Configure NGINX repository
|
||||
blockinfile:
|
||||
@ -21,7 +23,9 @@
|
||||
name = NGINX Repository
|
||||
module_hotfixes = true
|
||||
mode: 0644
|
||||
when: ansible_facts['distribution_major_version'] is version('8', '==')
|
||||
when:
|
||||
- ansible_facts['distribution_major_version'] is version('8', '==')
|
||||
- nginx_manage_repo | bool
|
||||
|
||||
- name: (CentOS/RHEL) Install NGINX
|
||||
yum:
|
||||
|
@ -3,6 +3,7 @@
|
||||
zypper_repository:
|
||||
name: "nginx-{{ nginx_branch }}"
|
||||
repo: "{{ nginx_repository | default(nginx_default_repository_suse) }}"
|
||||
when: nginx_manage_repo | bool
|
||||
|
||||
- name: (SLES) Install NGINX
|
||||
zypper:
|
||||
|
@ -5,6 +5,7 @@
|
||||
insertafter: EOF
|
||||
line: "{{ nginx_repository | default(nginx_plus_default_repository_alpine) }}"
|
||||
state: "{{ nginx_license_status | default ('present') }}"
|
||||
when: nginx_manage_repo | bool
|
||||
|
||||
- name: (Alpine Linux) Install NGINX Plus
|
||||
apk:
|
||||
|
@ -18,6 +18,7 @@
|
||||
update_cache: false
|
||||
state: "{{ nginx_license_status | default ('present') }}"
|
||||
mode: 0644
|
||||
when: nginx_manage_repo | bool
|
||||
|
||||
- name: (Debian/Ubuntu) Install NGINX Plus
|
||||
apt:
|
||||
|
@ -20,6 +20,7 @@
|
||||
}
|
||||
state: "{{ nginx_license_status | default ('present') }}"
|
||||
mode: 0644
|
||||
when: nginx_manage_repo | bool
|
||||
|
||||
- name: (FreeBSD) Install NGINX Plus
|
||||
pkgng:
|
||||
|
@ -11,6 +11,7 @@
|
||||
gpgcheck: true
|
||||
state: "{{ nginx_license_status | default ('present') }}"
|
||||
mode: 0644
|
||||
when: nginx_manage_repo | bool
|
||||
|
||||
- name: (Amazon Linux/CentOS/Oracle Linux/RHEL) Install NGINX Plus
|
||||
yum:
|
||||
|
@ -11,6 +11,7 @@
|
||||
name: nginx-plus
|
||||
repo: "{{ nginx_repository | default(nginx_plus_default_repository_suse) }}"
|
||||
state: "{{ nginx_license_status | default ('present') }}"
|
||||
when: nginx_manage_repo | bool
|
||||
|
||||
- name: (SLES) Install NGINX Plus
|
||||
zypper:
|
||||
|
Loading…
Reference in New Issue
Block a user