Hi,
That's exactly what I'm looking for.
I was trying to find a way to automatically configure my hosts for ansible
with one playbook by create a new user, add the ssh keys etc... but my
servers don't have the same password, so i'm trying to find a way where
ansible ask the password for each host.
So far i'm like you, it asks the password only at the begining and apply
that password for all of the hosts.
Have you found a way to do what you were looking for?
Thanks
Pierre
Le vendredi 3 mars 2017 16:47:59 UTC+1, Dennis Klein a écrit :
>
> Hello,
>
> i need to add my ssh key first to be able to connect using it.
>
> I made a simple playbook for it:
>
> - hosts: all
> tasks:
> - name: add admin ssh keys
> authorized_key: user=root key={{ ssh_key[item] }} state=present
> with_items:
> - user1
> - user2
> - user3
>
> I'm only asked once for a password, but all servershave different
> passwords.
>
> Why don't asks Ansible for a password every time the login via key don't
> works?
>
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e0156783-bb19-46db-9bbf-8857637f579c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.