-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1.docker.yml
More file actions
40 lines (28 loc) · 863 Bytes
/
Copy path1.docker.yml
File metadata and controls
40 lines (28 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
- name: "[docker]"
hosts: localhost
become: yes
gather_facts: false
tasks:
# Install Docker
# https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script
# Docker must be installed by convenient script, then updated by apt
- name: Install python docker module
pip:
name: docker-py
- name: Gather the package facts
package_facts:
manager: auto
- name: Download Docker install script
get_url:
url: https://get.docker.com
dest: /tmp/get-docker.sh
when: "'docker-ce' not in ansible_facts.packages"
- name: Install Docker # noqa 503
command: sh /tmp/get-docker.sh
when: "'docker-ce' not in ansible_facts.packages"
- name: Upgrade Docker
apt:
name: docker-ce
only_upgrade: yes
state: latest