added docker role for debian

This commit is contained in:
panda 2021-02-06 22:50:48 +01:00
parent dafe7018a8
commit 467261cd5b

View file

@ -0,0 +1,35 @@
- name: Include variables
include_vars:
file: "../../../variables.yml"
- name: Install docker prerequsistes
apt:
pkg:
- apt-transport-https
- ca-certificates
- curl
- software-properties-common
- gnupg-agent
- name: Add docker repo key
shell: curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
- name: add repo for docker
shell: echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list
- name: Update repositories cache
apt:
update_cache: yes
- name: install docker
apt:
pkg:
- docker-ce
#install compose:
- name: download compose
shell: curl -L https://github.com/docker/compose/releases/download/{{ compose_ver }}/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
- name: link compose
shell: chmod +x /usr/local/bin/docker-compose