summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2017-05-15 10:38:27 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2017-05-15 10:38:29 +0200
commit23927bfa8ee7b3d7053ab0ab2771b2954e4e267b (patch)
tree3f9c3012edc9247dd2bbbd49c4e14c1cd5bfcc5c /playbooks/adhoc
parent593ef653c0d17876b871a221587a472cb0235c97 (diff)
downloadopenshift-23927bfa8ee7b3d7053ab0ab2771b2954e4e267b.tar.gz
openshift-23927bfa8ee7b3d7053ab0ab2771b2954e4e267b.tar.bz2
openshift-23927bfa8ee7b3d7053ab0ab2771b2954e4e267b.tar.xz
openshift-23927bfa8ee7b3d7053ab0ab2771b2954e4e267b.zip
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 <gscrivan@redhat.com>
Diffstat (limited to 'playbooks/adhoc')
-rw-r--r--playbooks/adhoc/uninstall.yml7
1 files changed, 7 insertions, 0 deletions
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