Merge "Enable ssh connection retries in Ansible playbooks"
This commit is contained in:
@@ -100,7 +100,7 @@ stdout_callback = skippy
|
||||
#sudo_flags = -H -S -n
|
||||
|
||||
# SSH timeout
|
||||
#timeout = 10
|
||||
timeout = 60
|
||||
|
||||
# default user to use for playbooks if user is not specified
|
||||
# (/usr/bin/ansible will use current user as default)
|
||||
@@ -426,7 +426,7 @@ pipelining = False
|
||||
# Number of times to retry an SSH connection to a host, in case of UNREACHABLE.
|
||||
# For each retry attempt, there is an exponential backoff,
|
||||
# so after the first attempt there is 1s wait, then 2s, 4s etc. up to 30s (max).
|
||||
#retries = 3
|
||||
retries = 10
|
||||
|
||||
[persistent_connection]
|
||||
|
||||
|
||||
@@ -98,6 +98,10 @@
|
||||
registry: "{{ item['url'] }}"
|
||||
username: "{{ item['username'] }}"
|
||||
password: "{{ item['password'] }}"
|
||||
register: login_result
|
||||
retries: 10
|
||||
delay: 5
|
||||
until: login_result is succeeded
|
||||
with_items:
|
||||
- "{{ k8s_registry }}"
|
||||
- "{{ gcr_registry }}"
|
||||
@@ -128,6 +132,9 @@
|
||||
- name: Download images and push to local registry
|
||||
script: download_images.py {{ download_images }}
|
||||
register: download_images_output
|
||||
retries: 10
|
||||
delay: 5
|
||||
until: download_images_output.rc == 0
|
||||
environment:
|
||||
REGISTRIES: "{{ registries | to_json }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user