blob: 1f7fdf6692281fd4ca34dd236b822e265d9c9028 (
plain)
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
41
42
43
44
45
46
47
48
49
|
---
# file: roles/docker/tasks/main.yaml
- name: Docker - Install distribution - release - machine prerequisites
include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml'
tags: install-docker
- name: Docker - Create Service Directory
file:
path: '/etc/systemd/system/docker.service.d'
state: 'directory'
tags: install-docker
- name: Docker - Setup HTTP Proxy
template:
src: 'templates/docker.service.proxy.http'
dest: '/etc/systemd/system/docker.service.d/http-proxy.conf'
owner: 'root'
group: 'root'
mode: '0644'
notify:
- 'Restart Docker'
when: >
proxy_env is defined and
proxy_env.http_proxy is defined
tags: install-docker
- name: Docker - Setup HTTPS Proxy
template:
src: 'templates/docker.service.proxy.https'
dest: '/etc/systemd/system/docker.service.d/https-proxy.conf'
owner: 'root'
group: 'root'
mode: '0644'
notify:
- 'Restart Docker'
when: >
proxy_env is defined and
proxy_env.https_proxy is defined
tags: install-docker
- name: Docker - Set specific users to docker group
user:
name: '{{ item }}'
groups: 'docker'
append: True
with_items: '{{ docker_users }}'
when: docker_users
tags: install-docker
|