diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-01 13:07:27 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-01 13:07:27 +0300 |
commit | c3af9ee6eafe56c4be78bf6c356c789255d27a08 (patch) | |
tree | 66703e719e5c4bd6e6552b0e50cca729931d3449 | |
parent | retry timed out SSH connections (diff) | |
download | maintenance-c3af9ee6eafe56c4be78bf6c356c789255d27a08.tar.gz maintenance-c3af9ee6eafe56c4be78bf6c356c789255d27a08.zip |
move SSH settings from inventory to ansible.cfg
-rw-r--r-- | ansible.cfg | 5 | ||||
-rw-r--r-- | inventory.ini | 4 |
2 files changed, 5 insertions, 4 deletions
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 diff --git a/inventory.ini b/inventory.ini index a4b174d..fc380bb 100644 --- a/inventory.ini +++ b/inventory.ini @@ -13,7 +13,3 @@ vpn ansible_host=192.168.205.254 ansible_port=80 ansible_user=algo [all:vars] ansible_user=egor -# 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. -ansible_ssh_extra_args=-o ServerAliveInterval=15 -o ServerAliveCountMax=3 -o ForwardAgent=yes -o StrictHostKeyChecking=no |