I am running an Ansible script, which has a module which takes backup in the remote server. Since the backup job is taking more than 15 mins, the conn getting closed by remote host, as there is security standard implemented to close conn after 15 mins of idle time(ClientAliveInterval set in ssh_config). Don't want to change the security standard and also at the same time, want Ansible to work.
I have already tried below 2 solutions, but both not working. Any help in this regard will be much appreciated.
- Included
-o ServerAliveInterval
in ansible.cfg file in ssh_args section. - Implemented below param in the Ansible hosts by creating a config file in
.~/.ssh/config
TCPKeepAlive yes ServerAliveInterval 30
Thank you in advance.