Specific set of puppet modules attached to activation key

Hi Guys,

I have a new requirement for a few of our linux servers to trigger a registration to foreman and get access to specific repos and puppet modules. The repo’s part was easy since I can attach them to the activation key and when the linux server uses subscription-manager with that specific key it will get the appropriate repos. However, how do I make sure they also get a specific role assigned that applies a specific set of puppet modules? This part I am unclear on how to do. I am currently doing this via hostgroups for all my automatically foreman provisioned systems but how do I do this for something that is manually going to trigger via activation keys since I can’t attach a hostgroup to a activation key.

Any help with this would be greatly appreciated!

Thanks,
-J

Any ideas or help would be appreciated :slight_smile:

Thanks!

If your “roles” can be mapped to Hostgroups, then you want to check out the Default Hostgroup plugin, which should do what you want I think.

(Note the plugin is currently broken on 1.17 but I hope to have a new release out that fixes it in a few days)

Greg,

I see that you’ve made a lot of changes on on the Github repo in the past couple days. What is the best way to get that updating in foreman? When run yum update (or upgrade) on the package it shows that it’s the latest. Or is it something that hasn’t been fully pushed out?

Thanks for your help. This plugin is a game changer, good work.

The gem is released and the packages are built for Debian, if that’s your OS. If CentOS, then it’s just awaiting https://github.com/theforeman/foreman-packaging/pull/2508 to be merged, but many of the @packaging team are travelling this week. Hopefuly it should be merged soon.

If desperate, you can use the Plugin Manual’s notes on gem-based installation to try and install it, but do make backups if it’s a prod server :wink: