as I see it, based on your input, you have two problems: 1. you're creating the users and generating unique keys on each of the target hosts 2. you're trying to iterate through the 'rootkeys' in a way that will never work for the key parameter.
So, I'd use 'delegate_to: localhost' on the user task, then on the authorized_keys task, in the 'with_items' you would use rootkeys.ssh_public_key to access the keys. On Sunday, 11 January 2015 11:31:11 UTC+1, Mark Maas wrote: > > > > On Saturday, January 10, 2015 at 8:36:24 PM UTC+1, Dan Vaida wrote: >> >> Why not generate the keys on the box you're running Ansible from and then >> simply set them up on those three servers with >> http://docs.ansible.com/authorized_key_module.html ? >> >>> >>> > I'd love to, but I'm getting this message: > > > fatal: [10.220.226.158] => with_items expects a list or a set fatal: > [10.220.227.224] => with_items expects a list or a set > fatal: [10.220.225.209] => with_items expects a list or a set > > -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/95e9a436-7a23-40be-936e-e8b3511d67b4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.