ansible-role-nginx/tasks/plus/setup-alpine.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

8 lines
316 B
YAML

---
- name: "(Setup: Alpine Linux) Setup NGINX Plus Repository"
lineinfile:
path: /etc/apk/repositories
insertafter: EOF
line: "https://plus-pkgs.nginx.com/alpine/v{{ ansible_distribution_version | regex_search('^[0-9]+\\.[0-9]+') }}/main"
state: "{{ nginx_license_status | default ('present') }}"