Using an ansible playbook, I need to create a ssh-key with the name 'mykey' for each host in the group 'client'.
After that I need to add this generated ssh-key (the public key, of course) to the one authorized_keys file of one user of one host 'server'.
I know how to generate ssh-keys with ansible, and I know how to add one to the authorized_keys file, but I do not know to add keys of many clients to the authorized_keys file of one server. Any ideas? TIA!
I found a solution, using the
registeranddelegate_tooptions.Here is a snippet of my playbook: