Project

General

Profile

Support #656

'has_variable'

Added by Goa Cid about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Unattended installations
Target version:
-
Triaged:
No
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Hi,

In puppet I used to call 'has_variable' function.
I modify the preseed.rhtml file including this line :

d-i pkgsel/include string <%= @host.params["common_package_list"] %> <% if has_variable?("is_vm") -%> <%= @host.params["vm_package_list"] %> <% end -%>

Then I have the error below :
ActionView::TemplateError (undefined method `has_variable?' for #<ActionView::Base:0x7f8681e67c10>) on line #75 of app/views/unattended/preseed.rhtml:

How can I had the puppet method to foreman , if it is possible of course :)

History

#1 Updated by Ohad Levy about 8 years ago

since its pure ruby, you can do something like:


<% if @host.params["activation_key"] %>
/usr/sbin/rhnreg_ks --serverUrl=http://xmlrpc.rhn.errata.stage.redhat.com/XMLRPC --activationkey=<%= @host.params["activation_key"] %> --profilename=<%= @host.name %>
<% end -%>

#2 Updated by Ohad Levy about 8 years ago

  • Tracker changed from Feature to Support
  • Status changed from New to Feedback
  • Assignee changed from Ohad Levy to Goa Cid
  • Target version deleted (0.3)

#3 Updated by Goa Cid about 8 years ago

  • Status changed from Feedback to Closed

Thanks a lot :)

#4 Updated by Ohad Levy about 8 years ago

you probably want to look at this page TemplateWriting

Also available in: Atom PDF