ansible-role-nginx/tasks/plus/setup-license.yml
Alessandro Fael Garcia f3ec78e7ae Add support to the role for RHEL 8 and Alpine Linux (#129)
* Add support to the role for RHEL 8 and Alpine Linux

* Add NGINX Open Source support for Alpine Linux

* Add NGINX Open Source support for SLES 15

* Update supported platforms matrix
2019-05-20 17:32:08 +01:00

42 lines
1004 B
YAML

---
- name: "(All OSs) Setup NGINX Plus License"
block:
- name: "(All OSs) Create SSL Directory"
file:
path: /etc/ssl/nginx
state: directory
- name: "(All OSs) Copy NGINX Plus Certificate and License Key"
copy:
src: "{{ item }}"
dest: /etc/ssl/nginx
decrypt: yes
with_items:
- "{{ nginx_license.certificate }}"
- "{{ nginx_license.key }}"
when: ansible_distribution != "Alpine"
- name: "(Alpine Linux) Setup NGINX Plus License"
block:
- name: "(Alpine Linux) Create APK Directory"
file:
path: /etc/apk
state: directory
- name: "(Alpine Linux) Copy NGINX Plus Key"
copy:
src: "{{ nginx_license.key }}"
dest: /etc/apk/cert.key
decrypt: yes
- name: "(Alpine Linux) Copy NGINX Plus Certificate"
copy:
src: "{{ nginx_license.certificate }}"
dest: /etc/apk/cert.pem
decrypt: yes
when: ansible_distribution == "Alpine"