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:
Eric Engstrom 2021-04-20 16:47:20 -05:00
parent d9361630a9
commit db0e57251f
No known key found for this signature in database
GPG Key ID: 9232FD58D13AAAB2

View File

@ -9,6 +9,13 @@
package:
name: "{{ docker_package }}"
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
- name: Ensure Docker is started and enabled at boot.