On 29.01.2020 18:01, Dylan Martin wrote:
Hi all.
I have an environment with several hundred unreliable machines.
Sometimes
they're just dead, sometimes they're misconfigured. I always
encounter
some where the keys in my ssh-agent don't work and it prompts me to
enter
the password and it waits for me to hit enter a bunch of times before
the
play will proceed.
Is there a way to configure ssh or ansible to just fail when this
happens?
I sometimes will run plays with password auth instead of ssh keys, so I
don't want to completely disable that.
You could set ssh to only use keys by setting the variable
ansible_ssh_common_args="-o PreferredAuthentications=publickey".
It's also possible to set the environment variable
ANSIBLE_SSH_COMMON_ARGS to the same value.
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/dc1e4dd0afb06462b81a4bf60f9e4f65%40olstad.com.