Skip to content

diademiemi/ansible_role_docker

Repository files navigation

Ansible Role Docker

Molecule Test

This is an Ansible role to install and configure docker.

Include more information about docker in this section.

Requirements

These platforms are supported:

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Debian 11
  • Debian 12
  • EL 8 (Tested on Rocky Linux 8)
  • EL 9 (Tested on Rocky Linux 9)
  • Fedora 40
  • openSUSE Leap 15.5

Role Variables

Variable Default Description
docker_add_users_to_group true Whether to add users to docker group
docker_users [{{ ansible_user_id }}] Users to add to Docker group
docker_packages See vars/ Packages to install
docker_uninstall_old_packages See vars/ Which packages to install when __role_action is uninstall_old
docker_el_os_name See vars/ Repository name for RHEL-based Linux operating systems
docker_install_pip_packages true Whether to the Docker Python package
docker_pip_global_packages See vars/default.yml Global Python packages to install

Dependencies

None diademiemi.python collection when docker_install_pip_packages is true

Example Playbook

- name: Use diademiemi.docker role
  hosts: "{{ target | default('docker') }}"
  roles:
    - role: "diademiemi.docker"
      vars:
        __role_action: "setup"  # Variable to control which tasks are ran, default is "setup"
        # __role_action: "uninstall_old" # Uncomment to uninstall old packages
      tags: ['diademiemi', 'docker', 'setup']    ```

License

MIT

Author Information

  • diademiemi (@diademiemi)

Role Testing

This repository comes with Molecule that run in Podman on the supported platforms. Install Molecule by running

pip3 install -r requirements.txt

Run the tests with

molecule test

These tests are automatically ran by GitHub Actions on push. If the tests are successful, the role is automatically published to Ansible Galaxy.

About

Ansible role to install Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published