Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ansible: to how make Paramiko use ~/.ssh/config?

Ideally, of course, I'd like Ansible to completely take care of this.

If this is not possible (why?!), then, at least, I want to be able to extract ~/.ssh/config contents into some other format and then make Ansible feed this to Paramiko. I am sure I'm not the first one faced with this task, so what's the accepted way of doing this?

I need this in order to use authorized_keys module to turn on passwordless authentication.

Btw, I wish Ansible emitted some warning when falling back to non-default backend (like Paramiko). I lost a couple of hours yesterday and actually had to download Ansible sources to figure out why perfectly running Ansible command suddenly stopped running when adding -k / --ask-pass option (yes, I am completely new to Ansible).

like image 843
rincewind Avatar asked Jun 29 '17 19:06

rincewind


1 Answers

You can define this configuration in the Ansible configuration ini file or environment variables -- specifically the section for ANSIBLE_SSH_ARGS.

like image 94
Bruce Becker Avatar answered Sep 20 '22 13:09

Bruce Becker