2016-05-11 06:49:27 +08:00
|
|
|
---
|
2016-05-13 00:06:31 +08:00
|
|
|
- name: create docker service directory for systemd
|
2016-05-11 06:49:27 +08:00
|
|
|
file: path=/etc/systemd/system/docker.service.d state=directory
|
|
|
|
|
2016-05-13 00:06:31 +08:00
|
|
|
- name: drop docker environment conf to enable proxy usage
|
2016-05-11 06:49:27 +08:00
|
|
|
template:
|
|
|
|
src: http-proxy.conf.j2
|
|
|
|
dest: /etc/systemd/system/docker.service.d/http-proxy.conf
|
2016-05-13 00:06:31 +08:00
|
|
|
register: systemddockerproxy
|
2016-05-11 06:49:27 +08:00
|
|
|
|
2016-05-13 00:06:31 +08:00
|
|
|
- name: reload systemctl daemons
|
2016-05-11 06:49:27 +08:00
|
|
|
shell: systemctl daemon-reload
|
2016-05-13 00:06:31 +08:00
|
|
|
when: systemddockerproxy.changed
|
2016-05-11 06:49:27 +08:00
|
|
|
|
2016-05-13 00:06:31 +08:00
|
|
|
- name: restart docker so configs are applies
|
2016-05-11 06:49:27 +08:00
|
|
|
service: name=docker state=restarted
|
2016-05-13 00:06:31 +08:00
|
|
|
when: systemddockerproxy.changed
|