ansible-role-nginx/molecule/downgrade/converge.yml

24 lines
842 B
YAML
Raw Normal View History

2021-12-09 21:40:57 +01:00
---
- name: Converge
hosts: all
pre_tasks:
- name: Set repo if Alpine
ansible.builtin.set_fact:
2021-12-09 21:40:57 +01:00
version: "=1.20.2-r1"
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
ansible.builtin.set_fact:
2021-12-09 21:40:57 +01:00
version: "=1.20.2-1~{{ ansible_facts['distribution_release'] }}"
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: "-1.20.2-1.{{ (ansible_facts['distribution'] == 'Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
2021-12-09 21:40:57 +01:00
when: ansible_facts['os_family'] == "RedHat"
tasks:
- name: Install NGINX
ansible.builtin.include_role:
2021-12-09 21:40:57 +01:00
name: ansible-role-nginx
vars:
nginx_version: "{{ version }}"
nginx_branch: stable