ansible-role-nginx/tasks/opensource/setup-debian.yml
2019-11-22 15:52:34 +01:00

21 lines
785 B
YAML

---
- name: "(Install: Debian/Ubuntu) Set Default APT NGINX Repository"
set_fact:
default_repository:
- >-
deb https://nginx.org/packages/{{ (nginx_branch == 'mainline')
| ternary('mainline/', '') }}{{ ansible_distribution | lower }}/ {{ ansible_distribution_release }} nginx
- >-
deb-src https://nginx.org/packages/{{ (nginx_branch == 'mainline')
| ternary('mainline/', '') }}{{ ansible_distribution | lower }}/ {{ ansible_distribution_release }} nginx
- name: "(Install: Debian/Ubuntu) Set APT NGINX Repository"
set_fact:
repository: "{{ nginx_repository | default(default_repository) }}"
- name: "(Install: Debian/Ubuntu) Add NGINX Repository"
apt_repository:
repo: "{{ item }}"
with_items:
- "{{ repository }}"