robertdebock.docker_ce

Ansible Role Docker CE

This role installs and sets up Docker CE on your machine.

GitHub GitLab Downloads Version
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

State of Used Roles

The following roles help prepare your system. You can use other methods as well.

Requirement GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab
robertdebock.buildtools Build Status GitHub Build Status GitLab
robertdebock.core_dependencies Build Status GitHub Build Status GitLab
robertdebock.epel Build Status GitHub Build Status GitLab
robertdebock.python_pip Build Status GitHub Build Status GitLab

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: dependencies

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.

Informazioni sul progetto

Install and configure Docker CE on your system.

Installa
ansible-galaxy install robertdebock.docker_ce
Licenza
apache-2.0
Download
111k
Proprietario
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.