ansible-role-nginx/tasks/plus/install-alpine.yml
2021-12-07 02:47:13 +01:00

18 lines
781 B
YAML

---
- name: (Alpine Linux) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus repository
lineinfile:
path: /etc/apk/repositories
insertafter: EOF
line: "{{ nginx_repository | default(nginx_plus_default_repository_alpine) }}"
state: "{{ nginx_license_status | default((nginx_setup == 'uninstall') | ternary('absent', 'present')) }}"
when: nginx_manage_repo | bool
- name: (Alpine Linux) {{ nginx_setup | capitalize }} NGINX Plus
apk:
name: "nginx-plus{{ nginx_version | default('') }}"
repository: "{{ nginx_repository | default(nginx_plus_default_repository_alpine) }}"
state: "{{ nginx_state }}"
ignore_errors: "{{ ansible_check_mode }}"
when: nginx_license_status is not defined
notify: (Handler) Run NGINX