ansible-role-nginx/tasks/plus/setup-license.yml

43 lines
1.1 KiB
YAML
Raw Permalink Normal View History

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
block:
2020-09-19 17:32:17 +02:00
- name: (Debian/Red Hat/SLES OSs) Create SSL directory
file:
path: /etc/ssl/nginx
state: directory
mode: 0755
2020-09-19 17:32:17 +02:00
- name: (Debian/Red Hat/SLES OSs) Copy NGINX Plus certificate and license key
copy:
src: "{{ item }}"
dest: /etc/ssl/nginx
decrypt: true
mode: 0444
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"
2020-09-19 17:32:17 +02:00
- name: (Alpine Linux) Set up NGINX Plus license
block:
2020-09-19 17:32:17 +02:00
- name: (Alpine Linux) Create APK directory
file:
path: /etc/apk
state: directory
mode: 0755
2020-09-19 17:32:17 +02:00
- name: (Alpine Linux) Copy NGINX Plus key
copy:
2020-09-17 17:00:27 +02:00
src: "{{ nginx_license['key'] }}"
dest: /etc/apk/cert.key
decrypt: true
mode: 0444
2020-09-19 17:32:17 +02:00
- name: (Alpine Linux) Copy NGINX Plus certificate
copy:
2020-09-17 17:00:27 +02:00
src: "{{ nginx_license['certificate'] }}"
dest: /etc/apk/cert.pem
decrypt: true
mode: 0444
2020-09-15 21:27:06 +02:00
when: ansible_facts['os_family'] == "Alpine"