Last active
February 4, 2021 13:15
-
-
Save ursinn/bc74140d8bbe02bcbc2dd29786f1ebf0 to your computer and use it in GitHub Desktop.
Ansible Playbook for Docker (Debian 10)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
become: true | |
tasks: | |
- name: Install aptitude using apt | |
apt: name=aptitude state=latest update_cache=yes force_apt_get=yes | |
- name: Install required system packages | |
apt: name={{ item }} state=latest update_cache=yes | |
loop: [ 'apt-transport-https', 'ca-certificates', 'curl', 'gnupg-agent', 'software-properties-common'] | |
- name: Add Docker GPG apt Key | |
apt_key: | |
url: https://download.docker.com/linux/debian/gpg | |
state: present | |
- name: Add Docker Repository | |
apt_repository: | |
repo: deb https://download.docker.com/linux/debian buster stable | |
state: present | |
- name: Install Docker | |
apt: name={{ item }} state=latest update_cache=yes | |
loop: [ 'docker-ce', 'docker-ce-cli', 'containerd.io'] | |
- name: Install Docker Module for Python | |
pip: | |
name: docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment