enr0s.ansible_role_docker
Ansible Role Docker
This Ansible role installs Docker on your Raspberry Pi (64-bit).
Role Variables
- run_not_in_container: This variable helps skip some tasks during testing. For instance, the - /etc/hostsfile should only be changed manually at the image level and not at the container level.
Installation Options
- Edition: Choose between 'ce' (Community Edition) or 'ee' (Enterprise Edition).
docker_prerequisite_packages:
  - apt-transport-https
  - ca-certificates
  - curl
  - gnupg-agent
  - software-properties-common
  - jq
docker_edition: 'ce'
docker_packages:
  - "docker-{{ docker_edition }}"
  - "docker-{{ docker_edition }}-cli"
  - containerd.io
Docker installation settings:
docker_apt_release_channel: stable
docker_apt_repository: "deb [arch={{ ansible_architecture | replace('x86_64','amd64') | replace ('aarch64','arm64') }}] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
docker_apt_gpg_key: https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg
Docker Users
docker_users: ['ubuntu']
Dependencies
To install dependencies, run:
ansible-galaxy install -r requirements.yml
Example Playbook
Here’s how to use this role with variables:
---
- hosts: all
  roles:
    - {role: ansible-role-docker, run_not_in_container: True }
License
Apache-2.0
