don-geek-dom
Posts: 1
Joined: Tue Jun 25, 2019 12:01 pm

New to ansible - need help

Sat Aug 31, 2019 10:49 am

I've been working on setting up ansible to help with my multiple Pi's and I'm stuck. All of my Pi's are configured with ssh keys and passphrase. I can successfully test connections via "ansible RPis -m ping", but I have to enter the passphrase individually. Is there a way to hard code the passphrase?

Thanks

User avatar
B.Goode
Posts: 10925
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: New to ansible - need help

Sat Aug 31, 2019 1:49 pm

Welcome to the Raspberry Pi forums.


don-geek-dom wrote:
Sat Aug 31, 2019 10:49 am
I've been working on setting up ansible to help with my multiple Pi's and I'm stuck. All of my Pi's are configured with ssh keys and passphrase. I can successfully test connections via "ansible RPis -m ping", but I have to enter the passphrase individually. Is there a way to hard code the passphrase?

Thanks


ssh-agent in conjunction with ssh-add are probably what you need.


https://www.ssh.com/ssh/agent

mina
Posts: 34
Joined: Sun Sep 03, 2017 11:49 am
Location: Switzerland
Contact: Website

Re: New to ansible - need help

Sun Sep 01, 2019 10:10 am

don-geek-dom wrote:
Sat Aug 31, 2019 10:49 am
Is there a way to hard code the passphrase?
Here's an example (works with sshpass installed).
Maintainer of MoodleBox, a Moodle server on Raspberry Pi

Return to “Advanced users”