bf2916fc55
* Explicitly define `mode` in relevant tasks. * Explicitly define the `nginx` `apt_repository` filename in Debian based distros. * Building OpenSSL from source should now work properly in CentOS 8.
29 lines
1.0 KiB
YAML
29 lines
1.0 KiB
YAML
---
|
|
- name: "(Install: Debian/Ubuntu) Set Default APT NGINX Repository"
|
|
set_fact:
|
|
default_repository:
|
|
- >-
|
|
deb [arch=amd64] 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:
|
|
filename: nginx
|
|
repo: "{{ item }}"
|
|
update_cache: yes
|
|
mode: 0644
|
|
loop: "{{ repository }}"
|
|
|
|
- name: "(Install: Debian/Ubuntu) Install NGINX"
|
|
apt:
|
|
name: "nginx{{ nginx_version | default('') }}"
|
|
state: "{{ nginx_state }}"
|
|
notify: "(Handler: All OSs) Start NGINX"
|