2019-12-11 21:45:12 +01:00
|
|
|
---
|
2020-11-05 15:37:40 +01:00
|
|
|
- name: (FreeBSD) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus license verification
|
2020-09-15 21:27:06 +02:00
|
|
|
blockinfile:
|
|
|
|
path: /usr/local/etc/pkg.conf
|
|
|
|
block: |
|
|
|
|
PKG_ENV: { SSL_NO_VERIFY_PEER: "1",
|
|
|
|
SSL_CLIENT_CERT_FILE: "/etc/ssl/nginx/nginx-repo.crt",
|
|
|
|
SSL_CLIENT_KEY_FILE: "/etc/ssl/nginx/nginx-repo.key" }
|
|
|
|
state: "{{ nginx_license_status | default ('present') }}"
|
|
|
|
|
2020-11-05 15:37:40 +01:00
|
|
|
- name: (FreeBSD) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus repository
|
2019-12-11 21:45:12 +01:00
|
|
|
blockinfile:
|
|
|
|
path: /etc/pkg/nginx-plus.conf
|
2021-06-02 17:47:44 +02:00
|
|
|
create: true
|
2019-12-11 21:45:12 +01:00
|
|
|
block: |
|
|
|
|
nginx-plus: {
|
2020-11-05 15:37:40 +01:00
|
|
|
URL: {{ nginx_repository | default(nginx_plus_default_repository_freebsd) }}
|
2019-12-11 21:45:12 +01:00
|
|
|
ENABLED: yes
|
|
|
|
MIRROR_TYPE: SRV
|
|
|
|
}
|
|
|
|
state: "{{ nginx_license_status | default ('present') }}"
|
2020-08-28 10:30:23 +02:00
|
|
|
mode: 0644
|
2019-12-11 21:45:12 +01:00
|
|
|
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: (FreeBSD) Install NGINX Plus
|
2020-09-15 21:27:06 +02:00
|
|
|
pkgng:
|
|
|
|
name: "nginx-plus{{ nginx_version | default('') }}"
|
|
|
|
state: "{{ nginx_state }}"
|
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
|