---
-
  name: Update apt cache.
  ansible.builtin.apt:
    update_cache: true
    cache_valid_time: 600
  changed_when: false

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