Skip to content

Commit a6d54c8

Browse files
committed
Merge CentOS and RedHat tasks
1 parent 02db93d commit a6d54c8

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

tasks/unit/setup-redhat.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,11 @@
22
- name: "(Install: RedHat) Add NGINX Unit Repository"
33
yum_repository:
44
name: nginx
5-
baseurl: https://packages.nginx.org/unit/rhel/$releasever/$basearch/
5+
baseurl: https://packages.nginx.org/unit/{{ (ansible_distribution == "RedHat") | ternary('rhel/', 'centos/') }}$releasever/$basearch/
66
description: NGINX Repository
77
enabled: yes
88
gpgcheck: yes
9-
when: ansible_distribution == "RedHat"
10-
11-
- name: "(Install: CentOS) Add NGINX Unit Repository"
12-
yum_repository:
13-
name: nginx
14-
baseurl: https://packages.nginx.org/unit/centos/$releasever/$basearch/
15-
description: NGINX Repository
16-
enabled: yes
17-
gpgcheck: yes
18-
when: ansible_distribution == "CentOS"
9+
when: ansible_distribution != "Amazon"
1910

2011
- name: "(Install: Amazon Linux) Add NGINX Unit Repository"
2112
yum_repository:

0 commit comments

Comments
 (0)