Problem:
I’m trying to use the Register Host function to enroll a host into Puppet. While the host gets registered in Foreman the generated script does not install or call Puppet.
Expected outcome:
I’d expect the host to get registered in Puppet because the Host Group specified in the Register Host form has all the Puppet parameters setup (I cannot see any other to specify Puppet for Register Host). If I use the same Host Group to provision a host the ‘normal’ way through Preseed it does setup Puppet perfectly.
Foreman and Proxy versions:
Foreman: 2.4.0
Proxy 1: Logs, BMC, and Registration 2.4.0
Proxy 2: Puppet CA, Puppet, Logs, and Registration 2.4.0
Plugin Bootdisk: 17.0.2
Plugin Setup: 6.0.0
Distribution and version:
Installed using Foreman Puppet modules – all the latest versions.
Other relevant data:
I think the problem is that the Puppet fields from the Host Group are not applied to the new host, and therefore <% if @host.puppetmaster.present? -%>
in the template is not true. Here’s a crop of the Host Group showing that all Puppet fields have been speicified:
And here’s the Host that results after registering. You can see it’s linked to the Host Group but the fields have not been populated (yet specify inherit):
I also submitted this as a bug: Bug #32304: Register host does not use puppet settings from host group - Foreman