2018-01-10 23:40:01 +01:00
|
|
|
---
|
2019-11-22 15:52:34 +01:00
|
|
|
- name: "(Install: Debian/Ubuntu) Set Default APT NGINX Repository"
|
|
|
|
set_fact:
|
|
|
|
default_repository:
|
|
|
|
- >-
|
2019-12-27 17:07:49 +01:00
|
|
|
deb [arch=amd64] https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
2019-11-22 15:52:34 +01:00
|
|
|
| ternary('mainline/', '') }}{{ ansible_distribution | lower }}/ {{ ansible_distribution_release }} nginx
|
|
|
|
- >-
|
2020-07-07 18:42:00 +02:00
|
|
|
deb-src https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
2019-11-22 15:52:34 +01:00
|
|
|
| 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) }}"
|
|
|
|
|
2018-05-12 00:12:06 +02:00
|
|
|
- name: "(Install: Debian/Ubuntu) Add NGINX Repository"
|
2018-01-10 23:40:01 +01:00
|
|
|
apt_repository:
|
2020-08-28 10:30:23 +02:00
|
|
|
filename: nginx
|
2018-01-10 23:40:01 +01:00
|
|
|
repo: "{{ item }}"
|
2020-08-28 10:30:23 +02:00
|
|
|
update_cache: yes
|
|
|
|
mode: 0644
|
2020-07-08 14:55:15 +02:00
|
|
|
loop: "{{ repository }}"
|
2019-11-24 02:10:55 +01:00
|
|
|
|
|
|
|
- name: "(Install: Debian/Ubuntu) Install NGINX"
|
|
|
|
apt:
|
|
|
|
name: "nginx{{ nginx_version | default('') }}"
|
2019-12-07 01:48:15 +01:00
|
|
|
state: "{{ nginx_state }}"
|
2019-11-24 02:10:55 +01:00
|
|
|
notify: "(Handler: All OSs) Start NGINX"
|