2018-01-10 23:40:01 +01:00
|
|
|
---
|
2019-11-22 15:52:34 +01:00
|
|
|
- name: "(Install: CentOS/RedHat) Set Default YUM NGINX Repository"
|
|
|
|
set_fact:
|
|
|
|
default_repository: >-
|
|
|
|
https://nginx.org/packages/{{ (nginx_branch == 'mainline')
|
|
|
|
| ternary('mainline/', '') }}{{ (ansible_distribution == "RedHat")
|
|
|
|
| ternary('rhel', 'centos') }}/{{ ansible_distribution_major_version }}/$basearch/
|
|
|
|
|
|
|
|
- name: "(Install: CentOS/RedHat) Set YUM NGINX Repository"
|
|
|
|
set_fact:
|
|
|
|
repository: "{{ nginx_repository | default(default_repository) }}"
|
|
|
|
|
2018-05-12 00:12:06 +02:00
|
|
|
- name: "(Install: CentOS/RedHat) Add NGINX Repository"
|
2018-01-10 23:40:01 +01:00
|
|
|
yum_repository:
|
|
|
|
name: nginx
|
2019-11-22 15:52:34 +01:00
|
|
|
baseurl: "{{ repository }}"
|
2018-01-10 23:40:01 +01:00
|
|
|
description: NGINX Repository
|
|
|
|
enabled: yes
|
|
|
|
gpgcheck: yes
|
2019-11-24 02:10:55 +01:00
|
|
|
|
2019-11-26 22:12:09 +01:00
|
|
|
- name: "(Install: CentOS/RedHat) Install Required CentOS/RedHat Dependencies"
|
|
|
|
yum:
|
|
|
|
name: openssl
|
|
|
|
|
2019-11-24 02:10:55 +01:00
|
|
|
- name: "(Install: CentOS/RedHat) Install NGINX"
|
|
|
|
yum:
|
|
|
|
name: "nginx{{ nginx_version | default('') }}"
|
2019-12-07 01:48:15 +01:00
|
|
|
state: "{{ nginx_state }}"
|
2019-11-26 22:12:09 +01:00
|
|
|
disablerepo: "*"
|
|
|
|
enablerepo: "nginx"
|
2019-11-24 02:10:55 +01:00
|
|
|
notify: "(Handler: All OSs) Start NGINX"
|