Hey Jan,
in your role's files directory you would install the config and
authorized_keys as such:
rolename/files/home/$USER/.ssh/config
rolename/files/home/$USER/.ssh/authorized_keys
the $USER macro above implies that you actually created a directory
for each user in your role's files directory. To grab the user names
based on directories in home/, you can just iterate through them all
clipping off the home/ with bash substrings.
then in fixfiles (which operates on the STAGE directory, NOT the root
file system) you fix the permissions and ownership (note the relative
paths):
for user_dir in home/*; do
user_name=${user_dir:5}
chmod 700 ${user_dir}/.ssh
chmod 600 ${user_dir}/.ssh/authorized_keys
chown -R ${user_name} ${user_dir}/.ssh
done
you may also want to check to make sure the user exists on the target
system, and print a warning if they don't.
-Dan