ansible-role-nginx/tasks/opensource/setup-alpine.yml

17 lines
598 B
YAML
Raw Normal View History

---
- name: "(Install: Alpine) Set Default APK NGINX Repository"
set_fact:
default_repository: >-
https://nginx.org/packages/{{ (nginx_branch == 'mainline')
| ternary('mainline/', '') }}alpine/v{{ ansible_distribution_version.split('.')[0] }}.{{ ansible_distribution_version.split('.')[1] }}/main
- name: "(Install: Alpine) Set APK NGINX Repository"
set_fact:
repository: "{{ nginx_repository | default(default_repository) }}"
- name: "(Install: Alpine) Add NGINX Repository"
lineinfile:
path: /etc/apk/repositories
insertafter: EOF
line: "{{ repository }}"