Opening an SSH terminal based on Ansible inventory

214 views
Skip to first unread message

Mathieu Martin

unread,
May 1, 2014, 11:09:07 AM5/1/14
to ansible...@googlegroups.com
Hey all,

Is there an Ansible plugin that would allow me to open a plain old SSH terminal to one of the nodes in my Ansible inventory? I'd rather manage only one inventory (Ansible's) than two (Ansible + ssh config).

Please don't tell me that logging in is the "wrong way". I understand where that would be coming from, and I'm not looking to have that discussion ;-)

Thanks!

Mat

--

Organizer of DevOpsMtl. @webmatLinkedIn, blog.

Maciej Delmanowski

unread,
May 1, 2014, 11:13:38 AM5/1/14
to ansible...@googlegroups.com
If you don't want to "double the effort", you could try using Ansible inventory plugin that uses ~/.ssh/config as it's source: https://github.com/ansible/ansible/blob/devel/plugins/inventory/ssh_config.py

And interactive shell on your server is definitely a very useful thing while developing your playbook. :)


--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAFC6arKe1s3yoWc0dZj92a57Pm2p5OrbHWQYWUDekeWvfY2fkg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Michael DeHaan

unread,
May 1, 2014, 5:20:08 PM5/1/14
to ansible...@googlegroups.com

Mathieu Martin

unread,
May 2, 2014, 10:54:01 PM5/2/14
to ansible...@googlegroups.com
Thank you both!

I'll see how far I can get with ssh_config.py.

This is partly about not doubling the effort, indeed. But I also want to be able to jump on any node without too much fuss. So having an up to date SSH config makes sense to me.

Mat
Reply all
Reply to author
Forward
0 new messages