This repository contains the foundata.nginx Ansible Collection.
It provides resources to manage and use NGINX, a HTTP web server, reverse proxy, cache, and load balancer.
The primary role in this collection to configure and maintain NGINX, including
sites / virtual hosts (server {}) and related configuration. Its
README.md covers configuration and usage examples.
The role creates the default access.log and error.log with mode 0640 and
distribution-specific ownership: www-data:adm on Debian and Ubuntu,
nginx:root on RHEL-family systems, and nginx:nginx on SUSE. Debian, Ubuntu
and RHEL-family defaults match their packaged logrotate create directives.
SUSE inherits a bare global create, which preserves the existing attributes.
Use the run_nginx_access_log_default_file_* and
run_nginx_error_log_default_file_* options to override owner, group and mode.
Attribute changes preserve log contents and timestamps and do not restart NGINX.
If you override these values, align any explicit logrotate creation attributes
as well; the role does not manage log rotation or per-site log permissions.
- Ansible role:
foundata.nginx.run- Table of contents
- Features
- Example playbooks, using this role
- Supported tags
- Role variables
run_nginx_staterun_nginx_autoupgraderun_nginx_service_staterun_nginx_service_restartrun_nginx_service_restart_secrun_nginx_access_log_default_file_ownerrun_nginx_access_log_default_file_grouprun_nginx_access_log_default_file_moderun_nginx_error_log_default_file_ownerrun_nginx_error_log_default_file_grouprun_nginx_error_log_default_file_moderun_nginx_main_config_blockrun_nginx_events_config_blockrun_nginx_http_config_blockrun_nginx_main_config_baseline_managerun_nginx_events_config_baseline_managerun_nginx_http_config_baseline_managerun_nginx_sites_configrun_nginx_sites_delete_unmanagedrun_nginx_sites_defaultserver_managerun_nginx_modules_enabledrun_nginx_modules_disable_unmanagedrun_nginx_snippets_managerun_nginx_snippet_settingsrun_nginx_snippet_settings['hsts']run_nginx_snippet_settings['php-fpm']run_nginx_snippet_settings['tls-baseline']run_nginx_snippet_settings['tls-baseline']['stapling']run_nginx_snippet_settings['tls-baseline']['stapling_verify']run_nginx_snippet_settings['tls-baseline']['dhparam_path']run_nginx_snippet_settings['tls-baseline']['ecdh_curves']run_nginx_snippet_settings['tls-baseline']['resolvers']run_nginx_snippet_settings['tls-baseline']['resolver_timeout']
run_nginx_snippets_delete_unmanaged
- Dependencies
- Compatibility
- External requirements
See dependencies in galaxy.yml.
This project follows Semantic Versioning. Patch releases contain compatible fixes; minor releases may add compatible features or deprecations. Breaking changes, including changes to public defaults or removal of supported runtimes, require a major release.
Deprecations are announced in the changelog and relevant documentation, with migration guidance and the planned removal version. Deprecated interfaces remain available until that major release.
Copyright (c) 2026, foundata GmbH https://foundata.com
This project is licensed under the GNU General Public License v3.0 or later
(SPDX-License-Identifier: GPL-3.0-or-later), see
LICENSES/GPL-3.0-or-later.txt for the full
text.
The REUSE.toml file provides detailed licensing and copyright
information in a human- and machine-readable format. This includes parts that
may be subject to different licensing or usage terms, such as third-party
components. The repository conforms to the
REUSE specification. You can use
reuse spdx to create
an
SPDX software bill of materials (SBOM).
Third-party trademarks used in this repository:
- Ansible®, CentOS®, Fedora®, Red Hat® and RHEL® are trademarks of Red Hat, LLC, registered in the United States and other countries.
- Debian® is a trademark of Software in the Public Interest, Inc., registered in Germany and the United States.
- Linux® is a trademark of Linus Torvalds, registered in Germany, the European Union and the United States.
- openSUSE® is a trademark of SUSE LLC or its affiliates, registered in the European Union and the United States.
- SUSE® is a trademark of SUSE LLC or its affiliates, registered in Germany, the European Union and the United States.
- Ubuntu® is a trademark of Canonical Ltd., registered in Germany, the European Union and the United States.
Their use here is purely descriptive and does not imply any affiliation with or endorsement by the trademark holders.
Own and licensed trademarks used in this repository:
- foundata® is a trademark of IPAM GmbH, registered in Germany and the European Union, licensed to foundata GmbH.