robertdebock.docker_ce
Ansible Role Docker CE
This role installs and sets up Docker CE on your machine.
GitHub | GitLab | Downloads | Version |
---|---|---|---|
Example Playbook
Here’s a simple example from molecule/default/converge.yml
which is tested with each update.
---
- name: Setup Docker
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.docker_ce
docker_ce_privileged_users:
- woody
- buzz
Before running this, prepare your system using molecule/default/prepare.yml
:
---
- name: Prepare System
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
- role: robertdebock.epel
- role: robertdebock.buildtools
- role: robertdebock.python_pip
- role: robertdebock.core_dependencies
tasks:
- name: Create Test Users
ansible.builtin.user:
name: "{{ user }}"
loop:
- woody
- buzz
loop_control:
loop_var: user
For more detailed guidance, check out this full explanation.
Role Variables
You can find the default variables in defaults/main.yml
:
---
# Default settings for Docker CE
# Add users to the privileged Docker group, like this:
# docker_ce_privileged_users:
# - UserA
# - UserB
docker_ce_privileged_users: []
Requirements
- Required pip packages are listed in requirements.txt.
State of Used Roles
The following roles help prepare your system. You can use other methods as well.
Requirement | GitHub | GitLab |
---|---|---|
robertdebock.bootstrap | ||
robertdebock.buildtools | ||
robertdebock.core_dependencies | ||
robertdebock.epel | ||
robertdebock.python_pip |
Context
This role works with many other roles. To learn more, check the documentation of these roles.
Here’s a visual representation of related roles:
Compatibility
This role has been tested with these container images:
Container | Tags |
---|---|
Debian | bullseye |
EL | 9 |
Fedora | 38, 39 |
Ubuntu | all |
You need at least Ansible version 2.12. Tests were done on:
- Previous versions
- Current version
- Development version
If you encounter any issues, please report them on GitHub.
License
This project is licensed under the Apache-2.0.
Author Information
Created by robertdebock.
Feel free to consider sponsoring me.
ansible-galaxy install robertdebock.docker_ce