Skip to content
Snippets Groups Projects
Commit cdb63a8c authored by Markos Chandras's avatar Markos Chandras
Browse files

roles: docker: Ensure service is started if docker is already installed

If the 'docker' package is already installed, then the handlers will not
run and the service will not be (re-)started. As such, lets make sure
that the service is started even if the packages are already installed.
parent 44a0626f
No related branches found
No related tags found
No related merge requests found
...@@ -118,6 +118,12 @@ ...@@ -118,6 +118,12 @@
notify: restart docker notify: restart docker
when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] or is_atomic) and (docker_package_info.pkgs|length > 0) when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] or is_atomic) and (docker_package_info.pkgs|length > 0)
- name: ensure service is started if docker packages are already present
service:
name: docker
state: started
when: docker_task_result is not changed
- name: flush handlers so we can wait for docker to come up - name: flush handlers so we can wait for docker to come up
meta: flush_handlers meta: flush_handlers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment