Project

General

Profile

Actions

Bug #15449

closed

Template don't render @host variables

Added by Jérôme LEBEAU about 8 years ago. Updated about 8 years ago.

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

Description

Ubuntu 14.04
foreman 1.11.2-1 (install from repo)
foreman-remote-execution 0.3 (ruby-foreman-remote-execution 0.3.2-1)

I'm trying to use the variable @host.name in a job template by including <% @host.name %>

But , neither in the preview or the rendering, the variable is displayed.

Is it normal ?

Actions #1

Updated by Marek Hulán about 8 years ago

  • Status changed from New to Resolved

Hello, that is because there's equal sign missing in the erb tag. Equal sign says that the value of the erb tag should be printed in the rendered template. Try changing

<% @host.name %>

to

<%= @host.name %>

that should help. Please let us know if it resolved the issue for you.

Actions #2

Updated by Jérôme LEBEAU about 8 years ago

oops, my bad :) Thaks you very much !

Marek Hulán wrote:

Hello, that is because there's equal sign missing in the erb tag. Equal sign says that the value of the erb tag should be printed in the rendered template. Try changing

<% @host.name %>

to

<%= @host.name %>

that should help. Please let us know if it resolved the issue for you.

Actions

Also available in: Atom PDF