Add "docker-engine" role
[AnsibleRoles.git] / roles / docker-engine / tasks / main.yml
1 ---
2 # tasks file for docker-engine
3
4 - name: install "apt-transport-https" and "ca-certificates"
5   tags:
6     - docker
7     - packages
8   apt: >
9     name={{ item }}
10     state=installed
11   with_items:
12     - apt-transport-https
13     - ca-certificates
14   when: docker_apt_repository.startswith("https://")
15
16 - name: install docker.io repository GnuPG key
17   tags:
18     - docker
19     - packages
20   copy: >
21     dest=/etc/apt/trusted.gpg.d/
22     group=root
23     mode=644
24     owner=root
25     src=docker.gpg
26   notify:
27     - update APT repositories
28
29 - name: install docker.io repository configuration
30   tags:
31     - docker
32     - packages
33   template: >
34     dest=/etc/apt/sources.list.d/docker.list
35     group=root
36     mode=644
37     owner=root
38     src=docker.list.j2
39   notify:
40     - update APT repositories
41
42 - meta: flush_handlers
43   tags:
44     - docker
45     - packages
46
47 - name: install "docker-engine"
48   tags:
49     - docker
50     - packages
51   apt: >
52     name=docker-engine
53     state=installed