---
-
  name: Update pkg cache.
  ansible.builtin.command: pkg update -f
  environment:
    ASSUME_ALWAYS_YES: "yes"
  tags: ['skip_ansible_lint']

-
  name: Ensure nginx is installed.
  community.general.pkgng:
    name: "{{ nginx_package_name }}"
    state: present

-
  name: Create logs directory.
  ansible.builtin.file:
    path: /var/log/nginx
    state: directory
    mode: "0755"
