Skip to content

Commit 3a8e36e

Browse files
committed
Fix Debian/RedHat setup
* Change yum repository from nginx to unit * Remove apt task causing ansible to be non-idempotent
1 parent 6bba55e commit 3a8e36e

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

tasks/unit/setup-debian.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,3 @@
55
with_items:
66
- deb https://packages.nginx.org/unit/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} unit
77
- deb-src https://packages.nginx.org/unit/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} unit
8-
9-
- name: "(Install: Debian/Ubuntu) Update APT Cache"
10-
apt:
11-
update_cache: yes

tasks/unit/setup-redhat.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
- name: "(Install: RedHat) Add NGINX Unit Repository"
2+
- name: "(Install: CentOS/RedHat) Add NGINX Unit Repository"
33
yum_repository:
4-
name: nginx
4+
name: unit
55
baseurl: https://packages.nginx.org/unit/{{ (ansible_distribution == "RedHat") | ternary('rhel/', 'centos/') }}$releasever/$basearch/
6-
description: NGINX Repository
6+
description: NGINX Unit Repository
77
enabled: yes
88
gpgcheck: yes
99
when: ansible_distribution != "Amazon"
1010

1111
- name: "(Install: Amazon Linux) Add NGINX Unit Repository"
1212
yum_repository:
13-
name: nginx
13+
name: unit
1414
baseurl: https://packages.nginx.org/unit/amzn/$releasever/$basearch/
15-
description: NGINX Repository
15+
description: NGINX Unit Repository
1616
enabled: yes
1717
gpgcheck: yes
1818
when: ansible_distribution == "Amazon"

0 commit comments

Comments
 (0)