Hi,
I''m new to puppet so apologises if this is obvious and only proves that
I
haven''t read the manual from cover to cover (oops, did I really to
admit
that! ;-)
In the DebianRecipies example it uses the variable to determine the relative
path to some template files. The variable has been set up at the node level
however, there''s the possibility that it hasn''t been set
before use (go back
to jail, do not pass go!) and therefore I''d like check for it at the
class
level and give it a default if it hasn''t, just in case. How would I do
that?
I thought about something like this:
$dv = $dv ? {
default => "sarge"
}
but this would always override the variable with sarge. Then I thought about
this:
$dv = $dv ? {
etch => $dv
default => "sarge"
}
but can''t use that as this limits the possible options to both etch and
sarge leading to hard coding (eek!).
What I''d like to do is something like this:
$dv = $dv ? {
! default => $dv,
default => "sarge"
}
where ! equals not, i.e. a negation.
Is this possible or are there better ways to achieve this or am I completely
missing the point!
Regards,
Andrew
_______________________________________________
Puppet-users mailing list
Puppet-users@madstop.com
https://mail.madstop.com/mailman/listinfo/puppet-users