mirror of
https://github.com/de-it-krachten/ansible-role-nginx_docker
synced 2026-05-14 11:51:50 +00:00
No description
- Jinja 100%
# [1.4.0](https://github.com/de-it-krachten/ansible-role-nginx_docker/compare/v1.3.0...v1.4.0) (2026-03-15) ### Features * Added support for Fedora 43 ([ |
||
|---|---|---|
| .github/workflows | ||
| defaults | ||
| handlers | ||
| meta | ||
| molecule/default | ||
| tasks | ||
| templates | ||
| .ansible-lint | ||
| .cicd | ||
| .cicd.overwrite | ||
| .collections | ||
| .gitignore | ||
| .releaserc.yml | ||
| .roles | ||
| .yamllint | ||
| CHANGELOG.md | ||
| README.md | ||
ansible-role-nginx_docker
Manage nginx instance in Docker
Dependencies
Roles
- deitkrachten.openssl
Collections
- community.docker
Platforms
Supported platforms
- Red Hat Enterprise Linux 81
- Red Hat Enterprise Linux 91
- Red Hat Enterprise Linux 101
- RockyLinux 81
- RockyLinux 91
- RockyLinux 101
- OracleLinux 81
- OracleLinux 91
- OracleLinux 101
- AlmaLinux 81
- AlmaLinux 91
- AlmaLinux 101
- Debian 11 (Bullseye)1
- Debian 12 (Bookworm)1
- Debian 13 (Trixie)1
- Ubuntu 18.04 LTS1
- Ubuntu 20.04 LTS1
- Ubuntu 22.04 LTS1
- Ubuntu 24.04 LTS1
- Fedora 421
- Fedora 431
- Alpine 31
- Docker dind (CI only)
Note: 1 : no automated testing is performed on these platforms
Role Variables
defaults/main.yml
# nginx root
nginx_root_path: /export/docker/nginx
# Docker image to use
nginx_docker_image: nginx
nginx_docker_ssl: true
# Volume list
nginx_docker_volumes:
- "{{ nginx_confd_path }}:/etc/nginx/conf.d"
- "{{ nginx_certs_path }}:/etc/nginx/certs"
- "{{ nginx_html_path }}:/usr/share/nginx/html"
- "{{ nginx_log_path }}:/var/log/nginx"
# nginx config path (drop-in)
nginx_confd_path: "{{ nginx_root_path }}/conf.d"
# nginx certificate location
nginx_certs_path: "{{ nginx_root_path }}/certs"
# nginx HTML location
nginx_html_path: "{{ nginx_root_path }}/html"
# nginx log location
nginx_log_path: "{{ nginx_root_path }}/logs"
# nginx webroot
nginx_server_root: /usr/share/nginx/html
# FQDN of the web server
nginx_fqdn: www.example.com
nginx_vhosts:
- fqdn: "{{ nginx_fqdn }}"
root: "{{ nginx_server_root }}"
# SSL/TLS type
nginx_cert_type: 'self-signed'
# Ports
nginx_docker_ports:
- "443:443"
nginx_docker_expose: []
Example Playbook
molecule/default/converge.yml
- name: sample playbook for role 'nginx_docker'
hosts: all
become: 'yes'
vars:
molecule_driver: '{{ lookup(''env'', ''MOLECULE_DRIVER_NAME'') }}'
nginx_docker_environment: []
nginx_docker_networks: []
tasks:
- name: Include role 'nginx_docker'
ansible.builtin.include_role:
name: nginx_docker