diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-10-11 11:37:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 11:37:16 -0400 |
commit | c38f63cc4a7e8cf2942e5bc83ee92fbea7aa59fe (patch) | |
tree | 7825842debd1117b00f89c08e2e4d21039a6b2ec /roles | |
parent | 0db302a8eb8cef17fe20ef651cad6e4cb3308d2b (diff) | |
parent | 090ba0dbd9bd31be49b66d996a61b936773d65f1 (diff) | |
download | openshift-c38f63cc4a7e8cf2942e5bc83ee92fbea7aa59fe.tar.gz openshift-c38f63cc4a7e8cf2942e5bc83ee92fbea7aa59fe.tar.bz2 openshift-c38f63cc4a7e8cf2942e5bc83ee92fbea7aa59fe.tar.xz openshift-c38f63cc4a7e8cf2942e5bc83ee92fbea7aa59fe.zip |
Merge pull request #5721 from mgugino-upstream-stage/fix-docker-iptables
Ensure docker service status actually changes
Diffstat (limited to 'roles')
-rw-r--r-- | roles/docker/tasks/package_docker.yml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/roles/docker/tasks/package_docker.yml b/roles/docker/tasks/package_docker.yml index dbe0b0d28..888ae40e7 100644 --- a/roles/docker/tasks/package_docker.yml +++ b/roles/docker/tasks/package_docker.yml @@ -139,6 +139,13 @@ notify: - restart docker +# The following task is needed as the systemd module may report a change in +# state even though docker is already running. +- name: Detect if docker is already started + command: "systemctl show docker -p ActiveState" + changed_when: False + register: r_docker_already_running_result + - name: Start the Docker service systemd: name: docker @@ -151,7 +158,7 @@ delay: 30 - set_fact: - docker_service_status_changed: "{{ r_docker_package_docker_start_result | changed }}" + docker_service_status_changed: "{{ (r_docker_package_docker_start_result | changed) and (r_docker_already_running_result.stdout != 'ActiveState=active' ) }}" - name: Check for credentials file for registry auth stat: |