nginx/server: Update nginx to 1.22 on rhel hosts

This commit is contained in:
Timo Makinen 2023-10-10 18:47:13 +00:00
parent 42f725d6f8
commit 0db76e1481

View file

@ -2,18 +2,19 @@
- name: Include OS-specific variables - name: Include OS-specific variables
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml" ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
- name: Enable nginx:120 module - name: Enable nginx:122 module
ansible.builtin.command: ansible.builtin.command:
argv: argv:
- dnf - dnf
- module - module
- -y - -y
- enable - enable
- nginx:1.20 - nginx:1.22
creates: /etc/dnf/modules.d/nginx.module creates: /etc/dnf/modules.d/nginx.module
notify: Restart nginx
when: when:
- ansible_os_family == "RedHat" - ansible_os_family == "RedHat"
- ansible_distribution_major_version | int == 8 - ansible_distribution_major_version | int >= 8
- ansible_distribution != "Fedora" - ansible_distribution != "Fedora"
- name: Install packages - name: Install packages