Ansible Role docker
This role installs and configures docker.
Mandatory Requirements
Enable the official docker repository. This can be done using the linuxfabrik.lfops.repo_docker role.
If you use the „docker“ Playbook, this is automatically done for you.
Optional Role Variables
Variable |
Description |
Default Value |
---|---|---|
|
A list of DNS server for all Docker containers. |
The server’s nameserver |
|
A list of insecure registries (without TLS) which should be accepted by the docker daemon. |
unset |
|
The default logging driver for all containers. Possible options: https://docs.docker.com/config/containers/logging/configure/. |
|
|
A dictionary of logging options. Possible options: https://docs.docker.com/config/containers/logging/configure/. |
unset |
|
Enables or disables the docker service, analogous to |
|
|
Changes the state of the docker service, analogous to |
|
Example:
# optional
docker__daemon_json_dns:
- '{{ ansible_facts["dns"]["nameservers"][0] }}'
- 'dns.example.com'
docker__daemon_json_insecure_registries:
- 'registry.example.com:5000'
docker__daemon_json_log_driver: 'syslog'
docker__daemon_json_log_opts:
env: 'os,customer'
labels: 'somelabel'
max-file: '5'
max-size: '11m'
docker__service_enabled: true
docker__service_state: 'started'