Bit of a tricky situation, I have two hiera hashes, one for the user module that I call as follow:
$users = hiera_hash('users')
create_resources('user',$users)
And another for the authorized_keys module, similarly called via:
$keys = hiera_hash('ssh_authorized_keys')
create_resources('ssh_authorized_key',$keys)
I then have a list of maintenance users that is used for various tasks. They are created in the same way as users, just from a different hash as they don't belong to any other groups.
Each hash contains the relevant values as the module requires.
The tricky part comes in where each user must be able to log into any maintenance users' account using their own public key.
Thus each maintenance user must receive all the keys from all the normal users into his/her authorized_keys file.
I am not using puppetdb nor Enterprise, so my goto tool for this kind of challenge, exported resources, is not available to me.
I thought about building up the file from fragments, but could not get that to work, so I tried wrangling the answer from here Iterate over a hash key/values in Puppet into a solution, but was also not successful.
Now I fear I might be barking up the wrong tree altogether...
Could someone please give me some direction?