summaryrefslogtreecommitdiffstats
path: root/ansible/roles
diff options
context:
space:
mode:
authorMichal Ptacek <m.ptacek@partner.samsung.com>2019-04-03 14:12:14 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-03 14:12:14 +0000
commit05b9001fa01b3f1076a5a21f063ca40421a66333 (patch)
treedcd3d3b0f30747dfdc63915037cf4e3df1fa6a29 /ansible/roles
parent4e2e9e887b8941a501a80a6c870ad4cb9295ddac (diff)
parentcc1c010e69df78ff74fc4f36f10fb669624ded25 (diff)
Merge "Improving docker restart handler"
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/docker/handlers/docker_restart.yml18
-rw-r--r--ansible/roles/docker/handlers/main.yml5
2 files changed, 19 insertions, 4 deletions
diff --git a/ansible/roles/docker/handlers/docker_restart.yml b/ansible/roles/docker/handlers/docker_restart.yml
new file mode 100644
index 00000000..8feb9a95
--- /dev/null
+++ b/ansible/roles/docker/handlers/docker_restart.yml
@@ -0,0 +1,18 @@
+---
+- name: Stopping docker systemd service
+ systemd:
+ name: docker
+ state: stopped
+ enabled: true
+
+# WA for docker bug, see OOM-1735
+- name: Ensure docker.sock cleaned properly
+ file:
+ state: absent
+ path: /var/run/docker.sock
+
+- name: Starting docker systemd service
+ systemd:
+ name: docker
+ state: started
+ enabled: true
diff --git a/ansible/roles/docker/handlers/main.yml b/ansible/roles/docker/handlers/main.yml
index 5df47e8d..de4a52ac 100644
--- a/ansible/roles/docker/handlers/main.yml
+++ b/ansible/roles/docker/handlers/main.yml
@@ -1,6 +1,3 @@
---
- name: Restart Docker
- systemd:
- name: docker
- state: restarted
- enabled: yes
+ import_tasks: docker_restart.yml