Browse Source

Merge pull request #1105 from EricMountain-1A/fix-restart-docker-handler

Fix Docker restart handling
Brenton Leanhardt 9 năm trước cách đây
mục cha
commit
b733e7fb2c

+ 1 - 1
roles/docker/tasks/main.yml

@@ -12,7 +12,7 @@
   register: start_result
 
 - set_fact:
-    docker_service_status_changed = start_result | changed
+    docker_service_status_changed: start_result | changed
 
 - include: udev_workaround.yml
   when: docker_udev_workaround | default(False)

+ 6 - 0
roles/openshift_docker/handlers/main.yml

@@ -0,0 +1,6 @@
+---
+
+- name: restart openshift_docker
+  service:
+    name: docker
+    state: restarted

+ 3 - 3
roles/openshift_docker/tasks/main.yml

@@ -18,7 +18,7 @@
 
 - stat: path=/etc/sysconfig/docker
   register: docker_check
-  
+
 - name: Set registry params
   lineinfile:
     dest: /etc/sysconfig/docker
@@ -36,7 +36,7 @@
     reg_fact_val: "{{ openshift.common.docker_insecure_registries }}"
     reg_flag: --insecure-registry
   notify:
-  - restart docker
+  - restart openshift_docker
 
 # TODO: Enable secure registry when code available in origin
 # TODO: perhaps move this to openshift_docker?
@@ -50,4 +50,4 @@
       {% if openshift.node.docker_log_options is defined %}   {{ openshift.node.docker_log_options |  oo_split() | oo_prepend_strings_in_list('--log-opt ') | join(' ')}}  {% endif %} '"
   when: docker_check.stat.isreg
   notify:
-    - restart docker
+    - restart openshift_docker