Bug #5717
closedProvisioning template selection issue
Description
Our finish templates looked a bit like this:
Finish Bonded IF [ HostgroupA / production ]
Finish Default
A host I was provisioning was in HostgroupB, so I expected 'Finish Default' to be picked up from the operating system, but instead I got 'Finish Bonded IF'. Not good if they are on difference VLANs :)
What I believe is probably happening is when checking for an environment match it's just picking the first template in production, regardless of whether that environment is for an explicit hostgroup. The pseudo code logic should be (to my mind!):
for_each template
if template.hostgroup hostgroup and template.env env
use template
for_each template
if template.hostgroup hostgroup and ! isset(template.env)
use template
for_each template
if ! isset(template.hostgroup) and template.env env
use template
use os.template
cheers!
Updated by Dominic Cleal over 10 years ago
- Is duplicate of Bug #4287: Template associations on HG & Env is broken added
Updated by Dominic Cleal over 10 years ago
- Status changed from New to Duplicate
This has been fixed in Foreman 1.5.0 via #4287, thanks for the report!