Files
DockerComposeTemplates/ansible/provisoning/ubuntu/install-docker.yaml
2022-11-16 17:09:17 +01:00

35 lines
605 B
YAML

---
- hosts: all
become: yes
tasks:
# Install Docker
# --
#
- name: install prerequisites
apt:
name:
- docker.io
update_cache: yes
- name: add user permissions
shell: "usermod -aG docker {{ ansible_env.SUDO_USER }}"
- name: Reset ssh connection for changes to take effect
meta: "reset_connection"
# Installs Docker SDK
# --
#
- name: install python package manager
apt:
name: python3-pip
- name: install python sdk
become_user: "{{ ansible_env.SUDO_USER }}"
pip:
name:
- docker
- docker-compose