Ansible role to install and configure Docker container runtime.
Building and improving this Ansible role have been sponsored by my current and previous employers like Cloudpunks GmbH and Proact Deutschland GmbH.
- Minimum Ansible version:
2.10
Target system architecture used to select correct deb repository
docker_arch: amd64
Command executed to start the daemon
docker_daemon_command: /usr/bin/dockerd -H unix://
Add config options to daemon.json
docker_daemon_config:
log-driver: json-file
log-opts:
max-size: 5m
max-file: '3'
live-restore: true
docker_daemon_override: false
Path for the repository keyring
docker_keyring: /usr/share/keyrings/docker-archive-keyring.gpg
Optionally define mount flags for systemd
docker_mount_flags:
List of extra docker networks to create
docker_networks_extra: []
docker_networks_extra:
- name: traefik
driver: bridge
enable_ipv6: True
ipam_config:
- subnet: fdd1:ac8c:0557:7ce1::/64
force: False
state: present
List of general docker networks to create
docker_networks_general: []
docker_networks_general:
- name: traefik
driver: bridge
enable_ipv6: True
ipam_config:
- subnet: fdd1:ac8c:0557:7ce1::/64
force: False
state: present
List of extra docker registries to auto login
docker_registries_extra: []
docker_registries_extra:
- url: myregistry.example.com
username: docker
password: secure
email: [email protected]
reauthorize: False
state: present
List of general docker registries to auto login
docker_registries_general: '{{ docker_registries | default([]) }}'
docker_registries_general:
- url: myregistry.example.com
username: docker
password: secure
email: [email protected]
reauthorize: False
state: present
Install from upstream repository
docker_upstream_version: true
docker
Apache-2.0