https://github.com/magna-z/ansible-role-docker
Install and configure Docker Engine.
https://github.com/magna-z/ansible-role-docker
ansible ansible-role docker docker-engine dockerd
Last synced: about 2 months ago
JSON representation
Install and configure Docker Engine.
- Host: GitHub
- URL: https://github.com/magna-z/ansible-role-docker
- Owner: magna-z
- License: mit
- Created: 2022-12-18T09:24:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-27T22:03:36.000Z (over 2 years ago)
- Last Synced: 2025-05-14T09:51:41.762Z (about 1 year ago)
- Topics: ansible, ansible-role, docker, docker-engine, dockerd
- Homepage: https://docker.io
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
docker
---
Install and configure Docker Engine.
### Links
-
-
### Variables
- **`docker_apt_repository`** *(type=dict, mandatory)* - Object with struct `{repo_url: "", repo_branch: "stable|test|edge", key_url: "", key_id: ""}`. See [examples](#examples).
- **`docker_network_manage`** *(type=bool, default=true)* - Allow `dockerd` manage network on host. Else `dockerd` started with `--iptables=false --ip-forward=false --ip-masq=false` for create containers only with `--network=host`.
- **`docker_internal_network`** *(type=string, default="")* - Additional Docker network with resolving containers by name (resolving no available in default `bridge`). Only if `docker_network_manage: true`.
- **`docker_registry_mirrors`** *(type=list, default=[])* - Docker registry mirrors adding in `/etc/docker/daemon.json`.
- **`docker_registry_credentials`** *(type=list, default=[])* - List of objects with struct `{registry: "", username: "", password: ""}`. See [examples](#examples).
- **`docker_daemon_force_restart`** *(type=bool, default=false)* - Force restart `dockerd` when any containers is running.
### Examples
```yaml
# debian global
docker_apt_repository:
repo_url: https://download.docker.com/linux/debian
key_url: https://download.docker.com/linux/debian/gpg
# ubuntu global
docker_apt_repository:
repo_url: https://download.docker.com/linux/ubuntu
key_url: https://download.docker.com/linux/ubuntu/gpg
docker_registry_credentials:
- registry: https://index.docker.io/v1/
username: DOCKERHUB_USERNAME
password: DOCKERHUB_PASSWORD
docker_internal_network: internal
```