ansible-role-nginx/molecule/uninstall_plus/prepare.yml
2021-12-07 02:47:13 +01:00

31 lines
825 B
YAML

---
- name: Prepare license
hosts: localhost
gather_facts: false
tasks:
- name: Create ephemeral license certificate file from b64 decoded env var
copy:
content: "{{ lookup('env','NGINX_CRT') | b64decode }}"
dest: ../../files/license/nginx-repo.crt
force: false
mode: 0444
- name: Create ephemeral license key file from b64 decoded env var
copy:
content: "{{ lookup('env','NGINX_KEY') | b64decode }}"
dest: ../../files/license/nginx-repo.key
force: false
mode: 0444
- name: Prepare NGINX
hosts: all
tasks:
- name: Install NGINX
include_role:
name: ansible-role-nginx
vars:
nginx_type: plus
nginx_license:
certificate: license/nginx-repo.crt
key: license/nginx-repo.key