If you are using 1.9, there is a "exclusive" parameter that I believe makes exactly what you want, although it will force you into some extra work if you want multiple allowed keys
Javier Palacios On Wed, Oct 21, 2015 at 12:20 PM, DrDth <[email protected]> wrote: > Hello Ansible Community, > > I'm working on a possebility to manage different ssh public keys to > different servers. I try to accomplish that with the most efficient and > automated solution. My problem is that i want to lookup the files directly > with a loop variable. Therefore I use the lookup plugin logically. But I > want the keys I choose to be the only ones in the authorized_keys file on > the remote machine. So is there a chance to use the exclusive parameter of > the authorized keys module with a loop variable which uses the lookup > module? > > Thank you for your time! > > -- > 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/3e4a49cc-772a-45a5-a76f-6394453dad08%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/3e4a49cc-772a-45a5-a76f-6394453dad08%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CANsNpUS4FNyZ4XRGRfZiaise29Q8hneDE7Bgv8p8BvWSWsf7dQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
