opichon.docker_traefik
Ansible Role: Install traefik Proxy as a Docker Container
This is an Ansible role that sets up the traefik proxy using a Docker container.
Requirements
To use this role, you need Ansible version 1.2 or higher.
Role Variables
Here are the Ansible variables you can use, along with their default values:
traefik_certificates: [] # Certificates for traefik
traefik_docker_domain: # Domain for Docker
traefik_group: root # User group
traefik_dir: /etc/traefik # Directory for traefik configuration
traefik_network: traefik # Network name for Docker
traefik_user: root # User for running traefik
traefik_volumes: [] # Docker volumes
Here are variables related to ACME configuration for automatic SSL certificates:
acme_email: "[email protected]" # Email for ACME registration
acme_domains:
- domain: mydomain.com # Main domain
sans: # Subject Alternative Names
- www.mydomain.com
acme_logging: true # Enable logging
acme_staging: false # Use staging environment for testing
Example Playbook
Here’s an example of how to use this role in a playbook:
---
- hosts: webservers
roles:
- dzangolab.docker_traefik
traefik_certificates:
-
{
CertFile: "/path/to/certificate.crt",
KeyFile: "/path/to/keyfile.key"
}
traefik_docker_domain: mydomain.com
traefik_network: mydomain
traefik_volumes:
- /etc/ssl:/etc/ssl
License
This project is licensed under the MIT license.
Informazioni sul progetto
Installs traefik proxy and other useful services as docker containers
Installa
ansible-galaxy install opichon.docker_traefik
Licenza
mit
Download
371
Proprietario
Entrepreneur & CTO
Since 2003, I have helped SMEs and startups in all their IT-related needs.