Project

General

Profile

Actions

Support #656

closed

'has_variable'

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
Unattended installations
Target version:
-
Triaged:
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 :)

Actions #1

Updated by Ohad Levy about 13 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 -%>
Actions #2

Updated by Ohad Levy about 13 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)
Actions #3

Updated by Goa Cid about 13 years ago

  • Status changed from Feedback to Closed

Thanks a lot :)

Actions #4

Updated by Ohad Levy about 13 years ago

you probably want to look at this page TemplateWriting

Actions

Also available in: Atom PDF