Enabled ssh retries for ansible
Adds the option to retry failed ssh executions if the failure is encountered in ssh itself, not the remote command. This can be helpful if there are transient network issues. Set to 3 attempts, currently unable to override this setting. A future patch could expose it to end users. http://docs.ansible.com/ansible/latest/intro_configuration.html#retries Change-Id: I9a583e49253e3713f69981c4981369e4d35aaedd Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
527e03ca94
commit
d97d36c57d
|
@ -1261,6 +1261,9 @@ class AnsibleJob(object):
|
|||
config.write('internal_poll_interval = 0.01\n')
|
||||
|
||||
config.write('[ssh_connection]\n')
|
||||
# NOTE(pabelanger): Try up to 3 times to run a task on a host, this
|
||||
# helps to mitigate UNREACHABLE host errors with SSH.
|
||||
config.write('retries = 3\n')
|
||||
# NB: when setting pipelining = True, keep_remote_files
|
||||
# must be False (the default). Otherwise it apparently
|
||||
# will override the pipelining option and effectively
|
||||
|
|
Loading…
Reference in New Issue