yabusygin.docker
Ansible Role: Docker
This Ansible role installs Docker Engine and Docker Compose on Linux systems (Debian/Ubuntu).
Requirements
None.
Role Variables
Docker Daemon Settings
You can specify the Docker daemon configuration file (/etc/docker/daemon.json
) using the docker_config
variable:
docker_config:
userns-remap: default
insecure-registries:
- registry.example.com:5000
Here’s the default content of the configuration file:
{
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}
Dependencies for community.docker Modules
Dependencies for community.docker modules are installed by default.
If you don't want to install them, set docker_ansible_dependencies_install
to no
.
Checking Docker's Iptables Rules
The role checks the iptables rules set by Docker. If they are not present, the Docker daemon will restart. To turn off this feature, set the docker_iptables_check
variable to no
.
Dependencies
None.
Example Playbook
Default setup:
---
- name: "example #1"
hosts: server
tasks:
- name: Install Docker
ansible.builtin.import_role:
name: yabusygin.docker
Customized setup:
---
- name: "example #2"
hosts: server
tasks:
- name: Install Docker
ansible.builtin.import_role:
name: yabusygin.docker
vars:
docker_config:
userns-remap: default
log-driver: json-file
log-opts:
max-size: 10m
max-file: "3"
insecure-registries:
- registry.example.com:5000
docker_ansible_dependencies_install: no
License
MIT
Author Information
Alexey Busygin <yaabusygin@gmail.com>
Informazioni sul progetto
An Ansible role installing Docker Engine and Docker Compose.
Installa
ansible-galaxy install yabusygin.docker
Licenza
mit
Download
12.9k
Proprietario