theforeman/foreman · error · HostENCParamUndefined
Parameter %{name} is not set in host %{host} ENC output, res
Error message
Parameter %{name} is not set in host %{host} ENC output, resolving failed on step %{step} What it means
Error "Parameter %{name} is not set in host %{host} ENC output, resolving failed on step %{step}" thrown in theforeman/foreman.
Source
Thrown at app/services/foreman/renderer/scope/macros/host_template.rb:27
apipie :class do
name 'Host related macros'
sections only: %w[all provisioning partition_tables]
end
apipie :method, "Allows to retrieve parameters from host's ENC" do
list :path, 'List of strings representing path to a parameter to be returned'
raises error: HostENCParamUndefined, desc: "when the parameter is not set in host's ENC output"
returns one_of: [Hash, Object], desc: 'The value of a parameter or a key=value object with all information from ENC'
example "host_enc('parameters', 'enable-puppet7') #=> true"
example 'host_enc #=> {"parameters"=>{...}'
end
def host_enc(*path)
check_host
return enc if path.compact.empty?
path.reduce(enc) do |e, step|
e.fetch(step)
rescue KeyError
raise HostENCParamUndefined.new(name: path, step: step, host: host)
end
end
apipie :method, 'Allows to retrieve a parameter set on host' do
required :param_name, String, desc: 'name of the parameter'
optional :default, Object, desc: 'value to be returned if the parameter is not set on host'
returns Object, desc: 'Host parameter or default value'
example "host_param('systemLocale') #=> 'en-US'"
example "host_param('partitioning-method', 'regular') #=> 'regular'"
end
def host_param(param_name, default = nil)
check_host
host.host_param(param_name) || default
end
apipie :method, 'Allows to retrieve a parameter set on host' do
required :param_name, String, desc: 'name of the parameter'
raises error: HostParamUndefined, desc: 'when the parameter with provided name does not exist'View on GitHub (pinned to 6b05625475)
When it happens
Trigger: Thrown at app/services/foreman/renderer/scope/macros/host_template.rb:27 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of theforeman/foreman@6b05625475 (2026-08-23).
Data as JSON: /api/errors/1542fbaf159fbc1b.
Report an issue: GitHub.