From c3af9ee6eafe56c4be78bf6c356c789255d27a08 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 1 Apr 2022 13:07:27 +0300 Subject: move SSH settings from inventory to ansible.cfg --- ansible.cfg | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ansible.cfg') diff --git a/ansible.cfg b/ansible.cfg index b7b380a..ee26434 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -4,4 +4,9 @@ stdout_callback = yaml stderr_callback = yaml [ssh_connection] +# My connections are too flaky: retries = 2 +# I cannot believe ServerAlive* are not set by Ansible by default: +# https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-get-ansible-to-notice-a-dead-target-in-a-timely-manner +# Also, forward the SSH agent. +ssh_extra_args = -o ServerAliveInterval=15 -o ServerAliveCountMax=3 -o ForwardAgent=yes -o StrictHostKeyChecking=no -- cgit v1.2.3