How to use host parameters in puppet module

Hello

I want use the parameter @host.operatingsystem.major in puppet module.
But I did find document to use this functions.
Is there any body help me how to use it?

Thanks very much!

Xiaofei

If you have a smart class parameter on your Puppet class and you're
using Foreman 1.3, ensure the interpolate_erb_in_parameters setting is
enabled and then change the value of your parameter to:

<%= @host.operatingsystem.major %>

Foreman will run ERB inside your parameters so you can put these normal
template values in.

··· On 05/12/13 02:49, Yan Xiaofei wrote: > Hello > > I want use the parameter @host.operatingsystem.major in puppet module. > But I did find document to use this functions. > Is there any body help me how to use it? > > Thanks very much!


Dominic Cleal
Red Hat Engineering

锟斤拷 2013-12-5 16:46, Dominic Cleal wrote:
>> Hello
>>
>> I want use the parameter @host.operatingsystem.major in puppet module.
>> But I did find document to use this functions.
>> Is there any body help me how to use it?
>>
>> Thanks very much!
> If you have a smart class parameter on your Puppet class and you're
> using Foreman 1.3, ensure the interpolate_erb_in_parameters setting is
> enabled and then change the value of your parameter to:
>
> <%= @host.operatingsystem.major %>
Is this should be used in erb files
I want use case function in puppet manifest file. I look at the node
yaml and found the parameters "operatingsystemmajrelease"
I'll use this parameters to configure different yum repos.

Thanks very much
Xiaofei

··· > On 05/12/13 02:49, Yan Xiaofei wrote:

Foreman will run ERB inside your parameters so you can put these normal
template values in.