Ansible role to install the docker container runtime on debian-based systems. https://ednz.fr
Go to file
Bertrand Lanson 56c029a56f
All checks were successful
test / Linting (push) Successful in 2m18s
test / Molecule tests (default, debian11) (push) Successful in 2m23s
test / Molecule tests (default, debian12) (push) Successful in 1m34s
test / Molecule tests (default, ubuntu2004) (push) Successful in 1m45s
test / Molecule tests (default, ubuntu2204) (push) Successful in 1m41s
test / Molecule tests (with_custom_config, ubuntu2204) (push) Successful in 1m58s
test / Molecule tests (with_custom_config, ubuntu2004) (push) Successful in 2m20s
test / Molecule tests (with_custom_config, debian11) (push) Successful in 1m45s
test / Molecule tests (with_custom_config, debian12) (push) Successful in 1m50s
feat(core): change namespace
2024-02-05 22:28:39 +01:00
.gitea/workflows move to gitea actions, add supprot for debian12 2023-06-29 23:18:58 +02:00
.github/workflows feat(core): change namespace 2024-02-05 22:28:39 +01:00
defaults added auto_update feature 2023-06-03 22:02:24 +02:00
handlers feat: remove become from playbook 2023-12-03 17:29:45 +01:00
meta feat(core): change namespace 2024-02-05 22:28:39 +01:00
molecule feat(core): change namespace 2024-02-05 22:28:39 +01:00
tasks feat(core): change namespace 2024-02-05 22:28:39 +01:00
templates added a few tests, corrected various errors 2023-04-09 23:28:29 +02:00
vars fix handlers not flushing on time 2023-09-14 23:23:17 +02:00
.ansible-lint skeleton 2023-04-04 21:15:48 +02:00
.gitignore ignore .vscode 2023-05-21 20:17:09 +02:00
.yamllint skeleton 2023-04-04 21:15:48 +02:00
LICENSE move to gitea actions, add supprot for debian12 2023-06-29 23:18:58 +02:00
README.md feat(core): change namespace 2024-02-05 22:28:39 +01:00

install_docker

This repository is only a mirror. Development and testing is done on a private gitea server.

This role install and configure docker on debian-based distributions.

Requirements

None.

Role Variables

Available variables are listed below, along with default values. A sample file for the default values is available in default/install_docker.yml.sample in case you need it for any group_vars or host_vars configuration.

install_docker_edition: ce # by default, set to ce

This variable sets the edition of docker to install. It can be either ce (community edition) or ee (enterprise edition).

install_docker_auto_update: false # by default, set to false

This variable allows you to choose to automatically update docker if a newer version is available whenever the role is replayed. Updating docker is usually pretty safe if done on a regular basis.

install_docker_start_service: true

This variable defines whether or not to start the docker service after installing it. This can be turned off in case you're building golden images, so that your golden image does not start the docker service during it's build process.

install_docker_compose: false # by default, set to false

This variables defines whether or not to install docker-compose on the host.

install_docker_compose_version: latest # by default, set to latest

This variable defines the version of docker-compose to install. It support either latest, or the version number (vX.Y.Z). Officially, only versions >=v2.0.1 are supported, as the naming for most packages changed at this release.

install_docker_python_packages: false # by default, set to false

This variable defines whether or not to install the python packages for managing docker with ansible. This package is required if you plan to perform docker operations with ansible, and should be installed if that is your goal.

install_docker_python_packages_version: latest # by default, set to latest

This variable defines the version of the python docker package that should be installed. Refer to ednz_cloud/manage_pip_packages for documentation.

install_docker_users: [] #by default, set to []

This variable is a list of users to add to the docker group, so that they can perform docker related tasks, without requiring privilege escalation.

install_docker_daemon_options: {} # by default, set to {}

This variable defines the parameters to append to the daemon.json file (in /etc/docker/daemon.json). For more details, check out the documentation.

Dependencies

ednz_cloud.manage_pip_packages to install docker python packages for using the community.docker modules. ednz_cloud.manage_repositories to configure the docker apt repository. ednz_cloud.manage_apt_packages to install docker.

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

# calling the role inside a playbook with either the default or group_vars/host_vars
- hosts: servers
  roles:
    - ednz_cloud.install_docker

License

MIT / BSD

Author Information

This role was created by Bertrand Lanson in 2023.