Default parameter values are wrong set

Hi All,

Because I don't know for sure if this is a puppet question I ask it here.

My paramaters default value's are set as: ${$module::params::varname} in
foreman, and not as the default value as set in params.pp

So my config files are not written with the default value from the
params.pp when it's not overwritten on a host.

Is this something foreman is doing or just a puppet thing and how to fix ?

Cheers,

Matt

OK, this is fixed as forman imports the $module::params::varname but puppet
writes the default value of it.

It would be nicer if foreman would import the default value instead of the
paramater string.

Any fix on that ?

··· Op zaterdag 8 februari 2014 18:07:08 UTC+1 schreef Matt .: > > Hi All, > > Because I don't know for sure if this is a puppet question I ask it here. > > My paramaters default value's are set as: ${$module::params::varname} in > foreman, and not as the default value as set in params.pp > > So my config files are not written with the default value from the > params.pp when it's not overwritten on a host. > > Is this something foreman is doing or just a puppet thing and how to fix ? > > Cheers, > > Matt >

It seems when you select override in the pupperclass but don't overwrite on
hostlevel the following is printed in templates and so on:

${$modulename::params::paramname::}

When you override and chnage it @ hostlevel everything is written fine.
When you don't select override on class level, the default puppet value is
also written right.

What is FM doing here and why ? And how to fix this so with works puppet
native and also with FM in several options as above.

Thanks!

··· Op zaterdag 8 februari 2014 21:12:11 UTC+1 schreef yamaka...@gmail.com: > > OK, this is fixed as forman imports the $module::params::varname but > puppet writes the default value of it. > > It would be nicer if foreman would import the default value instead of the > paramater string. > > Any fix on that ? > > Op zaterdag 8 februari 2014 18:07:08 UTC+1 schreef Matt .: >> >> Hi All, >> >> Because I don't know for sure if this is a puppet question I ask it here. >> >> My paramaters default value's are set as: ${$module::params::varname} in >> foreman, and not as the default value as set in params.pp >> >> So my config files are not written with the default value from the >> params.pp when it's not overwritten on a host. >> >> Is this something foreman is doing or just a puppet thing and how to fix ? >> >> Cheers, >> >> Matt >> >

Small update on this one, following the wiki we are just screwed on this
part and and need to figure out if we want to use the a params.pp with the
default vars or just set them per class and have them set right when you
select overrride if you need to on some hosts.

Default Value This will be imported from puppet initially, but if puppet
is using any class inheritance, you'll get something unhelpful like
"${$foreman::params::user}". This is because Foreman won't follow the
inheritance, so you'll need to set a sensible default value

http://projects.theforeman.org/projects/1/wiki/Parameterized_class_support

Will this be changed in the future ?

··· Op zaterdag 8 februari 2014 18:07:08 UTC+1 schreef Matt .: > > Hi All, > > Because I don't know for sure if this is a puppet question I ask it here. > > My paramaters default value's are set as: ${$module::params::varname} in > foreman, and not as the default value as set in params.pp > > So my config files are not written with the default value from the > params.pp when it's not overwritten on a host. > > Is this something foreman is doing or just a puppet thing and how to fix ? > > Cheers, > > Matt >

It can't easily be fixed, since values of a Puppet variable may depend
on conditionals, facts or even parser functions. There's no guarantee
that their value is static.

··· On 09/02/14 11:31, yamakasi.014@gmail.com wrote: > Small update on this one, following the wiki we are just screwed on this > part and and need to figure out if we want to use the a params.pp with > the default vars or just set them per class and have them set right > when you select overrride if you need to on some hosts. > > /Default Value > This will be imported from puppet initially, but if puppet is using any > class inheritance, you'll get something unhelpful like > "${$foreman::params::user}". This is because Foreman won't follow the > inheritance, so you'll need to set a sensible default value > / > http://projects.theforeman.org/projects/1/wiki/Parameterized_class_support > > Will this be changed in the future ?


Dominic Cleal
Red Hat Engineering