This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Nginx

Native Nginx with validated consumer configuration

Installs Fedora’s nginx package and manages its native systemd service. The consumer supplies a complete nginx_config_template, including listeners, HTTP settings, MIME includes, and document roots. Replacing the main config also removes package-default virtual hosts from the active configuration.

Ansible renders and validates the entire candidate with nginx -t -c before atomically replacing nginx_config_path. Invalid candidates leave the prior configuration and running service intact. Valid changes notify a reload; an unchanged run does not restart or reload Nginx. The role never manages published content. Packages can be caller-managed with nginx_manage_packages: false.

The download component owns its routes, storage permissions, SELinux labels, and the Traefik TLS frontend. The role validation record links the consumer fixture and lifecycle results.

1 - Defaults

Defaults for nginx
# Complete configuration template owned by the consumer.
nginx_config_template: "{{ undefined() }}"
nginx_config_path: /etc/nginx/nginx.conf
nginx_binary: /usr/sbin/nginx
nginx_manage_packages: true
nginx_packages:
  - nginx
nginx_service_name: nginx