theforeman/foreman · error · Foreman::Exception

Template '%s' was not found

Error message

Template '%s' was not found

What it means

Error "Template '%s' was not found" thrown in theforeman/foreman.

Source

Thrown at app/models/concerns/orchestration/tftp.rb:76

    default_pxe_render(kind)
  end

  protected

  def build_pxe_render(kind)
    template = host.provisioning_template({:kind => kind})
    return unless template.present?
    host.render_template(template: template)
  rescue => e
    failure _("Unable to render %{kind} template '%{name}': %{e}") % { :kind => kind, :name => template.try(:name), :e => e }, e
  end

  def default_pxe_render(kind)
    template_name = host.local_boot_template_name(kind)
    # Safely return in case there's no template configured for the specified kind
    return unless template_name.present?
    template = ProvisioningTemplate.find_by_name(template_name)
    raise Foreman::Exception.new(N_("Template '%s' was not found"), template_name) unless template
    host.render_template(template: template)
  rescue => e
    failure _("Unable to render '%{name}' template: %{e}") % { :name => template_name, :e => e }, e
  end

  # Adds the host to the forward and reverse TFTP zones
  # +returns+ : Boolean true on success
  def setTFTP(kind)
    content = generate_pxe_template(kind)
    if content
      logger.info "Deploying TFTP #{kind} configuration for #{host.name}"
      each_unique_feasible_tftp_proxy do |proxy|
        mac_addresses_for_provisioning.each do |mac_addr|
          proxy.set(kind, mac_addr, {
                      :pxeconfig => content,
                      :targetos => host.operatingsystem.name.downcase,
                      :release => host.operatingsystem.release,
                      :arch => host.arch.name,

View on GitHub (pinned to 6b05625475)

When it happens

Trigger: Thrown at app/models/concerns/orchestration/tftp.rb:76 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/d869a777f19bd565. Report an issue: GitHub.