ansible-role-nginx/tasks/plus/setup-redhat.yml
Alessandro Fael Garcia 78a7e3efeb Multiple changes
* Add option to enable REST API
* Add option to enable live dashboard
* Add option to install WAF module
* Load modules in nginx.conf
* Improve version check for RedHat distros
2018-01-19 10:27:47 -08:00

26 lines
927 B
YAML

---
- name: "(CentOS/RedHat/Amazon Linux/Oracle Linux) Gather Distribution Version"
set_fact:
version: "6"
when: ansible_distribution_major_version|int == 6
- name: "(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: "(CentOS/RedHat/Amazon Linux/Oracle Linux) Gather Distribution Version"
set_fact:
version: "7.4"
when: ansible_distribution_major_version|float == 7.4
- name: "(CentOS/RedHat/Amazon Linux/Oracle Linux) Gather Distribution Version"
set_fact:
version: "amazon"
when: ansible_distribution == "Amazon"
- name: "(CentOS/RedHat/Amazon Linux/Oracle Linux) Add NGINX Plus Repository"
get_url:
url: https://cs.nginx.com/static/files/nginx-plus-{{ version }}.repo
dest: /etc/yum.repos.d/nginx-plus-{{ version }}.repo