Actions
Bug #38688
closedProvisioning templates use host_enc macro to determine the realm
Status:
Closed
Priority:
Normal
Assignee:
Category:
Unattended installations
Target version:
-
Difficulty:
Triaged:
No
Description
The provisioning templates use some variation of:
if host_enc['parameters']['realm'] && @host.realm
This requires the full ENC to be rendered for no good reason: the realm parameter is equivalent to @host.realm&.name (https://github.com/theforeman/foreman/blob/c28ab6ff1cd0b8fe77b853a5bfbd70ef86508af9/app/models/host_info_providers/static_info.rb#L54-L55). Since name is mandatory and we already check for @host.realm anyway we can drop the redundant check.
Actions