pass foreman user groups as parameters to puppet
Posted by OnionLook@reddit | linuxadmin | View on Reddit | 6 comments
I didn't find anything in the documentation or on Google, maybe I'm looking in the wrong way. Maybe someone can tell me how to pass a list of groups (or a list of users in a group) from Foreman groups to Puppet? I wouldn't want to write it manually, maybe there are variables that I haven't found?
P.S. One way to pass only one group\user is set it as owner. But i need to manage multiple groups\users.
Altered_Kill@reddit
user_groups: ‘group1,group2,group3’
Then: $user_groups = $::foreman_params[‘user_groups’]
OR $user_groups = hiera(‘user_groups’, [])
notice(“User Groups: ${user_groups}”)
OnionLook@reddit (OP)
so the only way is manually enter all groups into the parameter and there is no way to do this dynamically?
Altered_Kill@reddit
Write a script?
OnionLook@reddit (OP)
crutches where functionality should be...
Altered_Kill@reddit
Welcome to Linux.
OnionLook@reddit (OP)
you 20+ years late to say it. :)