What about a parameterised role that takes the user name, then you
"copy:" a public key (nested under e.g. your-role/files/home/{{ user
}}/.ssh/pubkey) up to /home/{{ user }}/.ssh/authorized_keysyou can use that sort of role with with_items or similar to provision all the users you want to a given group of hosts pretty easily, there's no need for lookups as you already have the file to hand. On 22 October 2015 at 12:55, DrDth <[email protected]> wrote: > @esco This wouldn't manage the different users on the remote systems > > @Javier It does not exactly what I want, cause the last key in the loop is > the one who becomes exclusive so none of the others will be in the > authorized_keys file. I need an option for keeping all keys and only those > which i choose to be the ones. > > -- > 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/c59bb8d6-9bb1-4268-a3a2-5133672a28fa%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/c59bb8d6-9bb1-4268-a3a2-5133672a28fa%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/CAK5eLPQkv2o%3DMTGhrKsa%3Dt93eRJHdMXsbsKj2eAtKUSNajiBVQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
