2018-01-10 23:40:01 +01:00
|
|
|
---
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: (Debian/Red Hat/SLES OSs) Set up NGINX Plus license
|
2019-05-20 18:32:08 +02:00
|
|
|
block:
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: (Debian/Red Hat/SLES OSs) Create SSL directory
|
2019-05-20 18:32:08 +02:00
|
|
|
file:
|
|
|
|
path: /etc/ssl/nginx
|
|
|
|
state: directory
|
2020-08-28 10:30:23 +02:00
|
|
|
mode: 0755
|
2019-05-20 18:32:08 +02:00
|
|
|
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: (Debian/Red Hat/SLES OSs) Copy NGINX Plus certificate and license key
|
2019-05-20 18:32:08 +02:00
|
|
|
copy:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: /etc/ssl/nginx
|
2021-06-02 17:47:44 +02:00
|
|
|
decrypt: true
|
2020-08-28 10:30:23 +02:00
|
|
|
mode: 0444
|
2020-07-08 14:55:15 +02:00
|
|
|
loop:
|
2020-09-17 17:00:27 +02:00
|
|
|
- "{{ nginx_license['certificate'] }}"
|
|
|
|
- "{{ nginx_license['key'] }}"
|
2020-09-15 21:27:06 +02:00
|
|
|
when: ansible_facts['os_family'] != "Alpine"
|
2019-05-20 18:32:08 +02:00
|
|
|
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: (Alpine Linux) Set up NGINX Plus license
|
2019-05-20 18:32:08 +02:00
|
|
|
block:
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: (Alpine Linux) Create APK directory
|
2019-05-20 18:32:08 +02:00
|
|
|
file:
|
|
|
|
path: /etc/apk
|
|
|
|
state: directory
|
2020-08-28 10:30:23 +02:00
|
|
|
mode: 0755
|
2019-05-20 18:32:08 +02:00
|
|
|
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: (Alpine Linux) Copy NGINX Plus key
|
2019-05-20 18:32:08 +02:00
|
|
|
copy:
|
2020-09-17 17:00:27 +02:00
|
|
|
src: "{{ nginx_license['key'] }}"
|
2019-05-20 18:32:08 +02:00
|
|
|
dest: /etc/apk/cert.key
|
2021-06-02 17:47:44 +02:00
|
|
|
decrypt: true
|
2020-08-28 10:30:23 +02:00
|
|
|
mode: 0444
|
2019-05-20 18:32:08 +02:00
|
|
|
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: (Alpine Linux) Copy NGINX Plus certificate
|
2019-05-20 18:32:08 +02:00
|
|
|
copy:
|
2020-09-17 17:00:27 +02:00
|
|
|
src: "{{ nginx_license['certificate'] }}"
|
2019-05-20 18:32:08 +02:00
|
|
|
dest: /etc/apk/cert.pem
|
2021-06-02 17:47:44 +02:00
|
|
|
decrypt: true
|
2020-08-28 10:30:23 +02:00
|
|
|
mode: 0444
|
2020-09-15 21:27:06 +02:00
|
|
|
when: ansible_facts['os_family'] == "Alpine"
|