Bug #15449
closed
Template don't render @host variables
Added by Jérôme LEBEAU over 8 years ago.
Updated over 8 years ago.
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 ?
- 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.
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.
Also available in: Atom
PDF