ansible-role-nginx/tasks/unit/setup-redhat.yml
Alessandro Fael Garcia 3a8e36e636 Fix Debian/RedHat setup
* Change yum repository from nginx to unit
* Remove apt task causing ansible to be non-idempotent
2018-06-27 11:07:35 -07:00

19 lines
633 B
YAML

---
- name: "(Install: CentOS/RedHat) Add NGINX Unit Repository"
yum_repository:
name: unit
baseurl: https://packages.nginx.org/unit/{{ (ansible_distribution == "RedHat") | ternary('rhel/', 'centos/') }}$releasever/$basearch/
description: NGINX Unit Repository
enabled: yes
gpgcheck: yes
when: ansible_distribution != "Amazon"
- name: "(Install: Amazon Linux) Add NGINX Unit Repository"
yum_repository:
name: unit
baseurl: https://packages.nginx.org/unit/amzn/$releasever/$basearch/
description: NGINX Unit Repository
enabled: yes
gpgcheck: yes
when: ansible_distribution == "Amazon"