2018-01-10 23:40:01 +01:00
|
|
|
---
|
2020-11-05 15:37:40 +01:00
|
|
|
- name: (Debian/Ubuntu) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus license verification
|
2018-03-02 01:15:27 +01:00
|
|
|
blockinfile:
|
|
|
|
path: /etc/apt/apt.conf.d/90nginx
|
|
|
|
create: yes
|
|
|
|
block: |
|
2021-05-04 20:14:51 +02:00
|
|
|
Acquire::https::{{ (nginx_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::Verify-Peer "true";
|
|
|
|
Acquire::https::{{ (nginx_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::Verify-Host "true";
|
|
|
|
Acquire::https::{{ (nginx_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslCert "/etc/ssl/nginx/nginx-repo.crt";
|
|
|
|
Acquire::https::{{ (nginx_repository | default(nginx_plus_default_repository_debian)) | regex_search('(?<=https://)[^/]*') }}::SslKey "/etc/ssl/nginx/nginx-repo.key";
|
2019-12-11 21:45:12 +01:00
|
|
|
state: "{{ nginx_license_status | default ('present') }}"
|
2020-08-28 10:30:23 +02:00
|
|
|
mode: 0444
|
2018-01-10 23:40:01 +01:00
|
|
|
|
2020-11-05 15:37:40 +01:00
|
|
|
- name: (Debian/Ubuntu) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus repository
|
2020-08-28 10:30:23 +02:00
|
|
|
apt_repository:
|
|
|
|
filename: nginx-plus
|
2020-11-05 15:37:40 +01:00
|
|
|
repo: "{{ nginx_repository | default(nginx_plus_default_repository_debian) }}"
|
2020-09-20 12:15:28 +02:00
|
|
|
update_cache: no
|
2020-08-28 10:30:23 +02:00
|
|
|
state: "{{ nginx_license_status | default ('present') }}"
|
|
|
|
mode: 0644
|
2020-09-15 21:27:06 +02:00
|
|
|
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: (Debian/Ubuntu) Install NGINX Plus
|
2020-09-15 21:27:06 +02:00
|
|
|
apt:
|
|
|
|
name: "nginx-plus{{ nginx_version | default('') }}"
|
|
|
|
state: "{{ nginx_state }}"
|
2020-09-20 12:15:28 +02:00
|
|
|
update_cache: yes
|
2020-10-28 20:12:57 +01:00
|
|
|
ignore_errors: "{{ ansible_check_mode }}"
|
2020-11-05 15:37:40 +01:00
|
|
|
when: nginx_license_status is not defined
|
2020-09-19 17:32:17 +02:00
|
|
|
notify: (Handler) Run NGINX
|