|
@ -199,11 +199,26 @@ |
|
|
mode: 0644 |
|
|
mode: 0644 |
|
|
when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "ClearLinux", "RedHat", "Suse"] or is_atomic) |
|
|
when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "ClearLinux", "RedHat", "Suse"] or is_atomic) |
|
|
|
|
|
|
|
|
- name: ensure service is started if docker packages are already present |
|
|
|
|
|
service: |
|
|
|
|
|
name: docker |
|
|
|
|
|
state: started |
|
|
|
|
|
when: docker_task_result is not changed |
|
|
|
|
|
|
|
|
- name: ensure docker started, remove our config if docker start failed and try again |
|
|
|
|
|
block: |
|
|
|
|
|
- name: ensure service is started if docker packages are already present |
|
|
|
|
|
service: |
|
|
|
|
|
name: docker |
|
|
|
|
|
state: started |
|
|
|
|
|
when: docker_task_result is not changed |
|
|
|
|
|
rescue: |
|
|
|
|
|
- debug: |
|
|
|
|
|
msg: "Docker start failed. Try to remove our config" |
|
|
|
|
|
- name: remove kubespray generated config |
|
|
|
|
|
file: |
|
|
|
|
|
path: "{{ item }}" |
|
|
|
|
|
state: absent |
|
|
|
|
|
with_items: |
|
|
|
|
|
- /etc/systemd/system/docker.service.d/http-proxy.conf |
|
|
|
|
|
- /etc/systemd/system/docker.service.d/docker-options.conf |
|
|
|
|
|
- /etc/systemd/system/docker.service.d/docker-dns.conf |
|
|
|
|
|
- /etc/systemd/system/docker.service.d/docker-orphan-cleanup.conf |
|
|
|
|
|
notify: restart docker |
|
|
|
|
|
|
|
|
- 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 |
|
|