ansible-role-nginx/tasks/unit/setup-redhat.yml
2018-07-18 13:35:04 -07:00

19 lines
695 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{{ (ansible_distribution_version == "2") | ternary('2', '') }}/$releasever/$basearch/
description: NGINX Unit Repository
enabled: yes
gpgcheck: yes
when: ansible_distribution == "Amazon"