Fix Debian/RedHat setup
* Change yum repository from nginx to unit * Remove apt task causing ansible to be non-idempotent
This commit is contained in:
parent
6bba55e4a2
commit
3a8e36e636
@ -5,7 +5,3 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- deb https://packages.nginx.org/unit/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} unit
|
- deb https://packages.nginx.org/unit/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} unit
|
||||||
- deb-src https://packages.nginx.org/unit/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} unit
|
- deb-src https://packages.nginx.org/unit/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} unit
|
||||||
|
|
||||||
- name: "(Install: Debian/Ubuntu) Update APT Cache"
|
|
||||||
apt:
|
|
||||||
update_cache: yes
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
---
|
---
|
||||||
- name: "(Install: RedHat) Add NGINX Unit Repository"
|
- name: "(Install: CentOS/RedHat) Add NGINX Unit Repository"
|
||||||
yum_repository:
|
yum_repository:
|
||||||
name: nginx
|
name: unit
|
||||||
baseurl: https://packages.nginx.org/unit/{{ (ansible_distribution == "RedHat") | ternary('rhel/', 'centos/') }}$releasever/$basearch/
|
baseurl: https://packages.nginx.org/unit/{{ (ansible_distribution == "RedHat") | ternary('rhel/', 'centos/') }}$releasever/$basearch/
|
||||||
description: NGINX Repository
|
description: NGINX Unit Repository
|
||||||
enabled: yes
|
enabled: yes
|
||||||
gpgcheck: yes
|
gpgcheck: yes
|
||||||
when: ansible_distribution != "Amazon"
|
when: ansible_distribution != "Amazon"
|
||||||
|
|
||||||
- name: "(Install: Amazon Linux) Add NGINX Unit Repository"
|
- name: "(Install: Amazon Linux) Add NGINX Unit Repository"
|
||||||
yum_repository:
|
yum_repository:
|
||||||
name: nginx
|
name: unit
|
||||||
baseurl: https://packages.nginx.org/unit/amzn/$releasever/$basearch/
|
baseurl: https://packages.nginx.org/unit/amzn/$releasever/$basearch/
|
||||||
description: NGINX Repository
|
description: NGINX Unit Repository
|
||||||
enabled: yes
|
enabled: yes
|
||||||
gpgcheck: yes
|
gpgcheck: yes
|
||||||
when: ansible_distribution == "Amazon"
|
when: ansible_distribution == "Amazon"
|
||||||
|
Loading…
Reference in New Issue
Block a user