ansible-role-nginx/tasks/opensource/setup-redhat.yml
2018-01-31 14:41:12 -08:00

37 lines
1.3 KiB
YAML

---
- name: "(Install: RedHat) Add Mainline NGINX Repository"
yum_repository:
name: nginx
baseurl: https://nginx.org/packages/mainline/rhel/{{ ansible_distribution_major_version|int }}/$basearch/
description: NGINX Repository
enabled: yes
gpgcheck: yes
when: branch == "mainline" and ansible_distribution == "RedHat"
- name: "(Install: CentOS) Add Mainline NGINX Repository"
yum_repository:
name: nginx
baseurl: https://nginx.org/packages/mainline/centos/{{ ansible_distribution_major_version|int }}/$basearch/
description: NGINX Repository
enabled: yes
gpgcheck: yes
when: branch == "mainline" and ansible_distribution == "CentOS"
- name: "(Install: RedHat) Add Stable NGINX Repository"
yum_repository:
name: nginx
baseurl: https://nginx.org/packages/rhel/{{ ansible_distribution_major_version|int }}/$basearch/
description: NGINX Repository
enabled: yes
gpgcheck: yes
when: branch == "stable" and ansible_distribution == "RedHat"
- name: "(Install: CentOS) Add Stable NGINX Repository"
yum_repository:
name: nginx
baseurl: https://nginx.org/packages/centos/{{ ansible_distribution_major_version|int }}/$basearch/
description: NGINX Repository
enabled: yes
gpgcheck: yes
when: branch == "stable" and ansible_distribution == "CentOS"