https://github.com/bodsch/ansible-nginx
(yet another) Ansible role to install and configure nginx.
https://github.com/bodsch/ansible-nginx
ansible ansible-role automation nginx nginx-server webserver
Last synced: 21 days ago
JSON representation
(yet another) Ansible role to install and configure nginx.
- Host: GitHub
- URL: https://github.com/bodsch/ansible-nginx
- Owner: bodsch
- License: apache-2.0
- Created: 2021-09-25T10:06:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-05-19T04:22:10.000Z (about 1 month ago)
- Last Synced: 2026-05-19T07:32:33.894Z (about 1 month ago)
- Topics: ansible, ansible-role, automation, nginx, nginx-server, webserver
- Language: Python
- Homepage:
- Size: 309 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Role: `nginx`
Ansible role to install and configure nginx.
[][ci]
[][issues]
[][releases]
[][galaxy]
[ci]: https://github.com/bodsch/ansible-nginx/actions
[issues]: https://github.com/bodsch/ansible-nginx/issues?q=is%3Aopen+is%3Aissue
[releases]: https://github.com/bodsch/ansible-nginx/releases
[galaxy]: https://galaxy.ansible.com/ui/standalone/roles/bodsch/nginx/
## Requirements & Dependencies
Ansible Collections
- [bodsch.core](https://github.com/bodsch/ansible-collection-core)
### Operating systems
Tested on
* ArchLinux
* ArtixLinux
* Debian based
- Debian 11 / 12
- Ubuntu 20.04 / 22.04
## usage
### default configuration
```yaml
nginx_acme: {}
nginx_default_site:
file: /etc/nginx/sites-enabled/default
remove: true
nginx_vhost_templates:
http: vhost_http.conf.j2
https: vhost_https.conf.j2
redirect: vhost_redirect.conf.j2
nginx_logging:
base_directory: /var/log/nginx
nginx_global: {}
nginx_events:
worker_connections: "1024"
multi_accept: false
nginx_logformat: {}
nginx_http: {}
nginx_gzip: {}
nginx_ssl: {}
nginx_custom_includes: {}
nginx_vhosts: []
```
- [`nginx_acme`](doc/acme.md)
- [`nginx_custom_includes`](doc/custom_includes.md)
- [`nginx_global`](doc/global.md)
- [`nginx_events`](doc/events.md)
- [`nginx_gzip`](doc/gzip.md)
- [`nginx_http`](doc/http.md)
- [`nginx_logformat`](doc/logformat.md)
- [`nginx_ssl`](doc/ssl.md)
- [`nginx_vhosts`](doc/vhosts.md)
- [`nginx_upstreams`](doc/upstreams.md)
## Contribution
Please read [Contribution](CONTRIBUTING.md)
## Development, Branches (Git Tags)
The `master` Branch is my *Working Horse* includes the "latest, hot shit" and can be complete broken!
If you want to use something stable, please use a [Tagged Version](https://github.com/bodsch/ansible-nginx/-/tags)!
---
## Author and License
- Bodo Schulz
## License
[Apache](LICENSE)
**FREE SOFTWARE, HELL YEAH!**