So I have Foreman set up, and would like to pass in a parameter that is basically a way to easily specify users and groups that can log in as that user. My idea is currently to have the parameter take this sort of input:
user1;group1,group2,group3.user2;group1,groupn.user3;group1
Normally (in other languages), I'd make a 2 dimensional array and then loop through it. This isn't really something that can be done in Puppet though.
I've written a custom function to expand out the group members, and then pass that into the k5login type. My next thought is to create a defined type for that. I'm just not sure if I can pass in 2 values... And am I re-inventing the wheel, or am I doing something sort of stupid here?
{ user1 => [ group1, ... ], user2 => ... }