diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-10-20 15:13:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-20 15:13:04 -0400 |
commit | 35ec3234caec58246a0bdb6955a63d430c3cf954 (patch) | |
tree | c34bc1616dbb6b5856b23ec4566537f405203001 /roles | |
parent | 495909e50146217adcca32e7c051f4f90dd39bf7 (diff) | |
parent | 263f6c31dd91a0b9da1ca5624f4020b956ce89f7 (diff) | |
download | openshift-35ec3234caec58246a0bdb6955a63d430c3cf954.tar.gz openshift-35ec3234caec58246a0bdb6955a63d430c3cf954.tar.bz2 openshift-35ec3234caec58246a0bdb6955a63d430c3cf954.tar.xz openshift-35ec3234caec58246a0bdb6955a63d430c3cf954.zip |
Merge pull request #5821 from abutcher/ca-trust-skip-restart
Check for container runtime prior to restarting when updating system CA trust.
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_node_certificates/handlers/main.yml | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/roles/openshift_node_certificates/handlers/main.yml b/roles/openshift_node_certificates/handlers/main.yml index 4abe8bcaf..ef66bf9ca 100644 --- a/roles/openshift_node_certificates/handlers/main.yml +++ b/roles/openshift_node_certificates/handlers/main.yml @@ -2,9 +2,21 @@ - name: update ca trust command: update-ca-trust notify: - - restart docker after updating ca trust + - check for container runtime after updating ca trust -- name: restart docker after updating ca trust +- name: check for container runtime after updating ca trust + command: > + systemctl -q is-active {{ openshift.docker.service_name }}.service + register: l_docker_installed + # An rc of 0 indicates that the container runtime service is + # running. We will restart it by notifying the restart handler since + # we have updated the system CA trust. + changed_when: l_docker_installed.rc == 0 + failed_when: false + notify: + - restart container runtime after updating ca trust + +- name: restart container runtime after updating ca trust systemd: name: "{{ openshift.docker.service_name }}" state: restarted |