From 23927bfa8ee7b3d7053ab0ab2771b2954e4e267b Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 15 May 2017 10:38:27 +0200 Subject: uninstall: handle container-engine Try to restart the docker service only when there is not already a running container-engine service. Signed-off-by: Giuseppe Scrivano --- playbooks/adhoc/uninstall.yml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'playbooks') diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml index beaf20b07..6119990fe 100644 --- a/playbooks/adhoc/uninstall.yml +++ b/playbooks/adhoc/uninstall.yml @@ -305,8 +305,15 @@ - shell: systemctl daemon-reload changed_when: False + - name: restart container-engine + service: name=container-engine state=restarted + ignore_errors: true + register: container_engine + - name: restart docker service: name=docker state=restarted + ignore_errors: true + when: "container_engine.state != 'started'" - name: restart NetworkManager service: name=NetworkManager state=restarted -- cgit v1.2.1