3b6c744166
This fixes a bug when only the license is deleted, making system updates fail since the NGINX Plus repository is still within the repositories list yet there is no license to authenticate to the repository
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
---
|
|
- name: "(Setup: All OSs Besides Alpine Linux) Setup NGINX Plus License"
|
|
block:
|
|
|
|
- name: "(Setup: All OSs Besides Alpine Linux) Create SSL Directory"
|
|
file:
|
|
path: /etc/ssl/nginx
|
|
state: directory
|
|
|
|
- name: "(Setup: All OSs Besides Alpine Linux) 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: "(Setup: Alpine Linux) Setup NGINX Plus License"
|
|
block:
|
|
|
|
- name: "(Setup: Alpine Linux) Create APK Directory"
|
|
file:
|
|
path: /etc/apk
|
|
state: directory
|
|
|
|
- name: "(Setup: Alpine Linux) Copy NGINX Plus Key"
|
|
copy:
|
|
src: "{{ nginx_license.key }}"
|
|
dest: /etc/apk/cert.key
|
|
decrypt: yes
|
|
|
|
- name: "(Setup: Alpine Linux) Copy NGINX Plus Certificate"
|
|
copy:
|
|
src: "{{ nginx_license.certificate }}"
|
|
dest: /etc/apk/cert.pem
|
|
decrypt: yes
|
|
|
|
when: ansible_distribution == "Alpine"
|