From efe65a4315b9bd3fdc37be7564fc2f1cb77e1817 Mon Sep 17 00:00:00 2001 From: Eric Mountain Date: Fri, 25 Dec 2015 11:08:25 +0100 Subject: Fixes typo assigning docker_service_status_changed which leads to misinterpretation in handler. Fixes Docker restart handling to ensure openshift_docker role does restart Docker on change. --- roles/docker/tasks/main.yml | 2 +- roles/openshift_docker/handlers/main.yml | 6 ++++++ roles/openshift_docker/tasks/main.yml | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 roles/openshift_docker/handlers/main.yml (limited to 'roles') diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 4e24fd3b3..a56f1f391 100644 --- a/roles/docker/tasks/main.yml +++ b/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) diff --git a/roles/openshift_docker/handlers/main.yml b/roles/openshift_docker/handlers/main.yml new file mode 100644 index 000000000..92a6c325f --- /dev/null +++ b/roles/openshift_docker/handlers/main.yml @@ -0,0 +1,6 @@ +--- + +- name: restart openshift_docker + service: + name: docker + state: restarted diff --git a/roles/openshift_docker/tasks/main.yml b/roles/openshift_docker/tasks/main.yml index 75e782eef..5a285e773 100644 --- a/roles/openshift_docker/tasks/main.yml +++ b/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 \ No newline at end of file + - restart openshift_docker -- cgit v1.2.3