mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2025-08-02 13:46:22 +02:00
Retry docker
package installation at least once.
Why: when a previous installation was removed, but left behind service configurations, and the docker service is disabled, package installation will occasionally fail the first time.
This commit is contained in:
parent
d9361630a9
commit
db0e57251f
@ -9,6 +9,13 @@
|
|||||||
package:
|
package:
|
||||||
name: "{{ docker_package }}"
|
name: "{{ docker_package }}"
|
||||||
state: "{{ docker_package_state }}"
|
state: "{{ docker_package_state }}"
|
||||||
|
# RETRY - when a previous installation was removed, but left behind service
|
||||||
|
# configurations, and the docker service is disabled, package installation
|
||||||
|
# will occasionally fail the first time, at least under Ubuntu 18.04.
|
||||||
|
retries: 2
|
||||||
|
delay: 2
|
||||||
|
register: install_result
|
||||||
|
until: install_result is not failed
|
||||||
notify: restart docker
|
notify: restart docker
|
||||||
|
|
||||||
- name: Ensure Docker is started and enabled at boot.
|
- name: Ensure Docker is started and enabled at boot.
|
||||||
|
Loading…
Reference in New Issue
Block a user