You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-homelab/ansible/roles/setup_docker/tasks/main.yml

44 lines
952 B
YAML

# following official instructions here: https://docs.docker.com/engine/install/debian/
- name: Install packages using apt
apt:
name:
- ca-certificates
- curl
- gnupg2
- lsb-release
state: present
update_cache: yes
- name: Add Docker GPG apt Key
apt_key:
url: https://download.docker.com/linux/debian/gpg
state: present
# TODO: paramaterize this
- name: Add Docker Repository
apt_repository:
repo: deb https://download.docker.com/linux/debian buster stable
state: present
- name: Install docker packages using apt
apt:
name:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-compose-plugin
state: present
update_cache: yes
- name: Install Docker Module for Python
pip:
name: docker
- name: Install Docker Compose Module for Python
pip:
name: docker-compose
- name: Ensure docker is started
service:
name: docker
state: started