ansible-role-nginx/tasks/plus/delete-license.yml
Alessandro Fael Garcia 3b6c744166
Delete NGINX Plus repository when license is deleted (#204)
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
2019-12-11 12:45:12 -08:00

35 lines
831 B
YAML

---
- name: "(Setup: All OSs) Set NGINX Plus License State"
set_fact:
nginx_license_status: absent
- name: "(Setup: All OSs Besides Alpine Linux) Delete NGINX Plus License"
file:
path: /etc/ssl/nginx
state: absent
when: ansible_distribution != "Alpine"
- name: "(Setup: Alpine Linux) Delete NGINX Plus License"
file:
path: "{{ item }}"
state: absent
loop:
- /etc/apk/cert.key
- /etc/apk/cert.pem
when: ansible_distribution == "Alpine"
- import_tasks: setup-alpine.yml
when: ansible_os_family == "Alpine"
- import_tasks: setup-bsd.yml
when: ansible_os_family == "FreeBSD"
- import_tasks: setup-debian.yml
when: ansible_os_family == "Debian"
- import_tasks: setup-redhat.yml
when: ansible_os_family == "RedHat"
- import_tasks: setup-suse.yml
when: ansible_os_family == "Suse"