ansible-role-nginx/tasks/plus/setup-redhat.yml

31 lines
1.1 KiB
YAML
Raw Normal View History

2018-01-10 23:40:01 +01:00
---
- name: "(Setup: CentOS/RedHat/Oracle Linux) Setup NGINX Plus Repository"
yum_repository:
name: nginx-plus
baseurl: >-
https://plus-pkgs.nginx.com/centos/{{ (ansible_distribution_version | float >= 7.4 and ansible_distribution_version | float < 8.0)
2020-09-08 00:44:54 +02:00
| ternary('7.4', ansible_distribution_major_version | int) }}/$basearch/
description: NGINX Plus Repository
sslclientcert: /etc/ssl/nginx/nginx-repo.crt
sslclientkey: /etc/ssl/nginx/nginx-repo.key
enabled: yes
gpgcheck: yes
state: "{{ nginx_license_status | default ('present') }}"
mode: 0644
when: ansible_distribution != "Amazon"
- name: "(Setup: Amazon Linux) Setup NGINX Plus Repository"
yum_repository:
name: nginx-plus
baseurl: >-
2020-09-08 00:44:54 +02:00
https://plus-pkgs.nginx.com/amzn{{ (ansible_distribution_version == '2')
| ternary('2', '') }}/$releasever/$basearch
description: NGINX Plus Repository
sslclientcert: /etc/ssl/nginx/nginx-repo.crt
sslclientkey: /etc/ssl/nginx/nginx-repo.key
enabled: yes
gpgcheck: yes
state: "{{ nginx_license_status | default ('present') }}"
mode: 0644
when: ansible_distribution == "Amazon"