Co-authored-by: Jurgen Verhasselt <hello@sjugge.be> Co-authored-by: Jurgen Verhasselt <sjugge@inuits.eu>
24 lines
960 B
YAML
24 lines
960 B
YAML
---
|
|
- name: (Amazon Linux/CentOS/Oracle Linux/RHEL) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus repository
|
|
yum_repository:
|
|
name: nginx-plus
|
|
baseurl: "{{ nginx_repository |
|
|
default(lookup('vars', 'nginx_plus_default_repository_' + ((ansible_facts['distribution'] == 'Amazon') | ternary('amazon', 'redhat')))) }}"
|
|
description: NGINX Plus Repository
|
|
sslclientcert: /etc/ssl/nginx/nginx-repo.crt
|
|
sslclientkey: /etc/ssl/nginx/nginx-repo.key
|
|
enabled: true
|
|
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:
|
|
name: "nginx-plus{{ nginx_version | default('') }}"
|
|
state: "{{ nginx_state }}"
|
|
update_cache: true
|
|
ignore_errors: "{{ ansible_check_mode }}"
|
|
when: nginx_license_status is not defined
|
|
notify: (Handler) Run NGINX
|