Project

General

Profile

Actions

Bug #10338

open

Using template_name variable in template causes error in Build Review

Added by larry campbell almost 9 years ago. Updated almost 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I have a provisioning template that is reading in its own title and splitting the string to get a portion for use in the script. The code works as expected, however I get a nasty error message when attempting to build.

Error Message:

The following errors may prevent a successful build: 
Templates
   Failure parsing ESXi55 Kickstart 1.4-7: undefined method `split' for nil:NilClass.

The Culprit code:

Kickstart Version: <%= @template_name.split(' ')[-1] %>

The split method works properly as here is the output:

Kickstart Version: 1.4-7

I want to reiterate, the failure message does not actually prevent the build from completing, and the split does indeed work properly. I marked this issue as a "refactor" due to the false report that there is a "failure parsing"


Related issues 3 (1 open2 closed)

Related to Foreman - Feature #746: Generate all the Host template when click on Build to avoid errors during installationClosedShlomi Zadok03/15/2011Actions
Related to Foreman - Feature #4672: Add possibility to render template name within a templateClosedLukas Zapletal03/17/2014Actions
Related to Foreman - Bug #9694: Usage of "osver" in templates give error when setting build mode.New03/10/2015Actions
Actions #1

Updated by Dominic Cleal almost 9 years ago

  • Related to Feature #746: Generate all the Host template when click on Build to avoid errors during installation added
Actions #2

Updated by Dominic Cleal almost 9 years ago

  • Related to Feature #4672: Add possibility to render template name within a template added
Actions #3

Updated by Dominic Cleal almost 9 years ago

  • Tracker changed from Refactor to Bug
  • Subject changed from using ruby split method in provisioning template reports "failure parsing" even though it actually succeeds to Using template_name variable in template causes error in Build Review
  • Category changed from Web Interface to Templates
  • translation missing: en.field_release deleted (50)
Actions #4

Updated by Dominic Cleal almost 9 years ago

  • Related to Bug #9694: Usage of "osver" in templates give error when setting build mode. added
Actions

Also available in: Atom PDF