Move docker systemd unit creation to docker role

Creating the unit using default settings early on
and then changing it during network_plugin section
leads to too many docker restarts and duplicated code.

Reversed Wants= dependence on docker.service so it does not
restart docker when reloading systemd

Consolidated all docker restart handlers.
This commit is contained in:
Matthew Mosesohn
2016-08-02 13:42:27 +03:00
parent 2af71f31b4
commit e8a1c7a53f
18 changed files with 38 additions and 128 deletions

View File

@@ -1,10 +1,4 @@
---
- name: Weave | restart docker
command: /bin/true
notify:
- Weave | reload systemd
- Weave | reload docker
- name: restart weave
command: /bin/true
notify:
@@ -27,11 +21,6 @@
- Weave | reload systemd
- reload weaveexpose
- name: Weave | reload docker
service:
name: docker
state: restarted
- name: reload weave
service:
name: weave