Puppet class variables with default 'undef' become mandatory in foreman

In puppet, one can define class variables with or without default value,
making them optional or mandatory. If the value is optional, I set it to
undef, e.g. :

class machinetypes::linux::informixserver (
$type = "innoc",
$version = "installed",
$usevg = "${clientcert}-vg01" ,
$config = undef ,
$recoveryurl = undef ,
)

This works perfectly in puppet, but when I import the class in foreman, the
variables with the undef default become mandatory.

Is this not the way to go ? Who's wrong ? Puppet for allowing it or foreman
for making it mandatory ?

Kindest regards,

Peter.

··· --

IK GA ERVOOR
Een zorgjob. Da’s werken met je hoofd, handen en hart.



DISCLAIMER :
De personeelsleden van het agentschap doen hun best om in e-mails
betrouwbare informatie te geven. Toch kan niemand rechten doen gelden op
basis van deze inhoud. Als in de e-mail een stellingname voorkomt, is
dat niet noodzakelijk het standpunt van het agentschap. Rechtsgeldige
beslissingen of officiele standpunten worden alleen per brief toegestuurd.

I think it's Foreman: Bug #2191: No distinction between no param default and "undef" default - Smart Proxy - Foreman

Currently the proxy doesn't distinguish between a parameter with an
default value of undef and no default value. Once we can make that
distinction, then we should be able to handle this differently during
import.

··· -- Dominic Cleal Red Hat Engineering

On 27/02/13 13:08, Peter Van Biesen wrote:

In puppet, one can define class variables with or without default value,
making them optional or mandatory. If the value is optional, I set it to
undef, e.g. :

class machinetypes::linux::informixserver (
$type = “innoc”,
$version = “installed”,
$usevg = “${clientcert}-vg01” ,
$config = undef ,
$recoveryurl = undef ,
)

This works perfectly in puppet, but when I import the class in foreman,
the variables with the undef default become mandatory.

Is this not the way to go ? Who’s wrong ? Puppet for allowing it or
foreman for making it mandatory ?

Kindest regards,

Peter.

IK GA ERVOOR
Een zorgjob. Da’s werken met je hoofd, handen en hart.
http://www.ikgaervoor.be http://www.ikgaervoor.be/


DISCLAIMER :
De personeelsleden van het agentschap doen hun best om in e-mails
betrouwbare informatie te geven. Toch kan niemand rechten doen gelden op
basis van deze inhoud. Als in de e-mail een stellingname voorkomt, is
dat niet noodzakelijk het standpunt van het agentschap. Rechtsgeldige
beslissingen of officiele standpunten worden alleen per brief toegestuurd.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Hi, I have just come across an issue with some class parameters which by
default in the puppet class are set to undef.

Is it now possible in foreman to leave a default as undef but override if
want to? At present I seem to just end up with my variable being set to the
word undef…

Thanks,
Andy.

··· On Wednesday, 27 February 2013 13:15:42 UTC, Dominic Cleal wrote: > > I think it's Foreman: http://projects.theforeman.org/issues/2191 > > Currently the proxy doesn't distinguish between a parameter with an > default value of undef and no default value. Once we can make that > distinction, then we should be able to handle this differently during > import. > > -- > Dominic Cleal > Red Hat Engineering > > On 27/02/13 13:08, Peter Van Biesen wrote: > > In puppet, one can define class variables with or without default value, > > making them optional or mandatory. If the value is optional, I set it to > > undef, e.g. : > > > > class machinetypes::linux::informixserver ( > > $type = "innoc", > > $version = "installed", > > $usevg = "${clientcert}-vg01" , > > $config = undef , > > $recoveryurl = undef , > > ) > > > > This works perfectly in puppet, but when I import the class in foreman, > > the variables with the undef default become mandatory. > > > > Is this not the way to go ? Who's wrong ? Puppet for allowing it or > > foreman for making it mandatory ? > > > > Kindest regards, > > > > Peter. > > > > > > > > IK GA ERVOOR > > Een zorgjob. Da's werken met je hoofd, handen en hart. > > http://www.ikgaervoor.be > > > > > --------------------------------------------------------------------------------- > > > DISCLAIMER : > > De personeelsleden van het agentschap doen hun best om in e-mails > > betrouwbare informatie te geven. Toch kan niemand rechten doen gelden op > > basis van deze inhoud. Als in de e-mail een stellingname voorkomt, is > > dat niet noodzakelijk het standpunt van het agentschap. Rechtsgeldige > > beslissingen of officiele standpunten worden alleen per brief > toegestuurd. > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to foreman-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com. > > > Visit this group at http://groups.google.com/group/foreman-users?hl=en. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > >

Hi

We've seen the same issue as Andrew and we were wondering if there was a
way around it if want to override a value for one server then we have to
export all the logic from puppet (or hiera) into foreman for every other
host using that parameter. It's made harder by the act that smart matchers
don't support regex yet too.

Andrew the workaround we currently use is to use defensive coding and throw
away any blank parameters passed into our profile from foreman and reset
then to undef. (Which works but does add complexity to our profiles and
sometimes isn't the behaviour you actually want :-).

Would it be possible to set undef as a default option when overriding smart
class parameters?

Thanks
Charlie

··· On Thu, Feb 6, 2014 at 10:15 AM, Andrew Holford wrote:

Hi, I have just come across an issue with some class parameters which by
default in the puppet class are set to undef.

Is it now possible in foreman to leave a default as undef but override if
want to? At present I seem to just end up with my variable being set to the
word undef…

Thanks,
Andy.

On Wednesday, 27 February 2013 13:15:42 UTC, Dominic Cleal wrote:

I think it’s Foreman: Bug #2191: No distinction between no param default and “undef” default - Smart Proxy - Foreman

Currently the proxy doesn’t distinguish between a parameter with an
default value of undef and no default value. Once we can make that
distinction, then we should be able to handle this differently during
import.


Dominic Cleal
Red Hat Engineering

On 27/02/13 13:08, Peter Van Biesen wrote:

In puppet, one can define class variables with or without default
value,
making them optional or mandatory. If the value is optional, I set it
to
undef, e.g. :

class machinetypes::linux::informixserver (
$type = “innoc”,
$version = “installed”,
$usevg = “${clientcert}-vg01” ,
$config = undef ,
$recoveryurl = undef ,
)

This works perfectly in puppet, but when I import the class in foreman,
the variables with the undef default become mandatory.

Is this not the way to go ? Who’s wrong ? Puppet for allowing it or
foreman for making it mandatory ?

Kindest regards,

Peter.

IK GA ERVOOR
Een zorgjob. Da’s werken met je hoofd, handen en hart.
http://www.ikgaervoor.be http://www.ikgaervoor.be/


DISCLAIMER :
De personeelsleden van het agentschap doen hun best om in e-mails
betrouwbare informatie te geven. Toch kan niemand rechten doen gelden
op
basis van deze inhoud. Als in de e-mail een stellingname voorkomt, is
dat niet noodzakelijk het standpunt van het agentschap. Rechtsgeldige
beslissingen of officiele standpunten worden alleen per brief
toegestuurd.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.

For more options, visit https://groups.google.com/groups/opt_out.

> Hi
>
> We've seen the same issue as Andrew and we were wondering if there was a
> way around it if want to override a value for one server then we have to
> export all the logic from puppet (or hiera) into foreman for every other
> host using that parameter. It's made harder by the act that smart matchers
> don't support regex yet too.
>
> Ori Rabin has been working on it, and demonstrated a few features at [1]
It would be very nice if you can provide feedback before it gets merged[2],
as this is planned for 1.7.

thanks,
Ohad

[1] https://www.youtube.com/watch?v=Z75Z670WqZs
[2] https://github.com/theforeman/foreman/pull/1768

··· On Thu, Oct 2, 2014 at 10:48 AM, Charlie Derwent < shelltoesuperstar@gmail.com> wrote:

Andrew the workaround we currently use is to use defensive coding and
throw away any blank parameters passed into our profile from foreman and
reset then to undef. (Which works but does add complexity to our
profiles and sometimes isn’t the behaviour you actually want :-).

Would it be possible to set undef as a default option when overriding
smart class parameters?

Thanks
Charlie

On Thu, Feb 6, 2014 at 10:15 AM, Andrew Holford andrewholford@gmail.com > wrote:

Hi, I have just come across an issue with some class parameters which by
default in the puppet class are set to undef.

Is it now possible in foreman to leave a default as undef but override if
want to? At present I seem to just end up with my variable being set to the
word undef…

Thanks,
Andy.

On Wednesday, 27 February 2013 13:15:42 UTC, Dominic Cleal wrote:

I think it’s Foreman: Bug #2191: No distinction between no param default and “undef” default - Smart Proxy - Foreman

Currently the proxy doesn’t distinguish between a parameter with an
default value of undef and no default value. Once we can make that
distinction, then we should be able to handle this differently during
import.


Dominic Cleal
Red Hat Engineering

On 27/02/13 13:08, Peter Van Biesen wrote:

In puppet, one can define class variables with or without default
value,
making them optional or mandatory. If the value is optional, I set it
to
undef, e.g. :

class machinetypes::linux::informixserver (
$type = “innoc”,
$version = “installed”,
$usevg = “${clientcert}-vg01” ,
$config = undef ,
$recoveryurl = undef ,
)

This works perfectly in puppet, but when I import the class in
foreman,
the variables with the undef default become mandatory.

Is this not the way to go ? Who’s wrong ? Puppet for allowing it or
foreman for making it mandatory ?

Kindest regards,

Peter.

IK GA ERVOOR
Een zorgjob. Da’s werken met je hoofd, handen en hart.
http://www.ikgaervoor.be http://www.ikgaervoor.be/


DISCLAIMER :
De personeelsleden van het agentschap doen hun best om in e-mails
betrouwbare informatie te geven. Toch kan niemand rechten doen gelden
op
basis van deze inhoud. Als in de e-mail een stellingname voorkomt, is
dat niet noodzakelijk het standpunt van het agentschap. Rechtsgeldige
beslissingen of officiele standpunten worden alleen per brief
toegestuurd.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.

For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.