---
-
  name: Enable nginx repo.
  ansible.builtin.template:
    src: nginx.repo.j2
    dest: /etc/yum.repos.d/nginx.repo
    owner: root
    group: "{{ root_group }}"
    mode: "0644"
  when: nginx_yum_repo_enabled | bool

-
  name: Ensure nginx is installed.
  ansible.builtin.package:
    name: "{{ nginx_package_name }}"
    state: present
