-
Notifications
You must be signed in to change notification settings - Fork 353
/
converge.yml
35 lines (35 loc) · 1.28 KB
/
converge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
- name: Converge
hosts: all
pre_tasks:
- name: Set repo if Alpine
ansible.builtin.set_fact:
version: =32-r1
cacheable: true
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
ansible.builtin.set_fact:
version: =32-1~{{ ansible_facts['distribution_release'] }}
cacheable: true
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: -32-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
cacheable: true
when: ansible_facts['os_family'] == "RedHat"
- name: Set repo if SLES
ansible.builtin.set_fact:
version: =32-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
cacheable: true
when: ansible_facts['os_family'] == "Suse"
tasks:
- name: Install NGINX
ansible.builtin.include_role:
name: ansible-role-nginx
vars:
nginx_type: plus
nginx_license:
certificate: license/nginx-repo.crt
key: license/nginx-repo.key
nginx_remove_license: false
nginx_version: "{{ version }}"