added docker role for debian
This commit is contained in:
parent
dafe7018a8
commit
467261cd5b
1 changed files with 35 additions and 0 deletions
35
roles/docker/tasks/debian.yml
Normal file
35
roles/docker/tasks/debian.yml
Normal 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
|
Loading…
Reference in a new issue