add3bfba0b
The get_url module has python 2.7 dependencies. This causes errors on distros that have strict python 2.6 dependencies. Replacing the get_url module with a hardcoded code block using the blockinfile module circumvents these errors.
43 lines
1.5 KiB
YAML
43 lines
1.5 KiB
YAML
---
|
|
- name: "(Install: CentOS/RedHat/Amazon Linux/Oracle Linux) Gather Distribution Version"
|
|
set_fact:
|
|
version: "6"
|
|
when: ansible_distribution_major_version|int == 6
|
|
|
|
- name: "(Install: CentOS/RedHat/Amazon Linux/Oracle Linux) Gather Distribution Version"
|
|
set_fact:
|
|
version: "7"
|
|
when: ansible_distribution_major_version|float >= 7.0 and ansible_distribution_major_version|float <= 7.3
|
|
|
|
- name: "(Install: CentOS/RedHat/Amazon Linux/Oracle Linux) Gather Distribution Version"
|
|
set_fact:
|
|
version: "7.4"
|
|
when: ansible_distribution_major_version|float == 7.4
|
|
|
|
- name: "(Install: CentOS/RedHat/Amazon Linux/Oracle Linux) Gather Distribution Version"
|
|
set_fact:
|
|
version: "amazon"
|
|
when: ansible_distribution == "Amazon"
|
|
|
|
- name: "(Install: CentOS/RedHat/Oracle Linux) Add NGINX Plus Repository"
|
|
yum_repository:
|
|
name: nginx-plus
|
|
baseurl: https://plus-pkgs.nginx.com/centos/{{ version }}/$basearch/
|
|
description: NGINX Plus Repository
|
|
sslclientcert: /etc/ssl/nginx/nginx-repo.crt
|
|
sslclientkey: /etc/ssl/nginx/nginx-repo.key
|
|
enabled: yes
|
|
gpgcheck: yes
|
|
when: ansible_distribution != "Amazon"
|
|
|
|
- name: "(Install: Amazon Linux) Add NGINX Plus Repository"
|
|
yum_repository:
|
|
name: nginx-plus
|
|
baseurl: https://plus-pkgs.nginx.com/amzn/$releasever/$basearch
|
|
description: NGINX Plus Repository
|
|
sslclientcert: /etc/ssl/nginx/nginx-repo.crt
|
|
sslclientkey: /etc/ssl/nginx/nginx-repo.key
|
|
enabled: yes
|
|
gpgcheck: yes
|
|
when: ansible_distribution == "Amazon"
|