> Wouldn't this possibly have unintended consequences, or would the scope
> of the overrides be restricted to the define in this case?
afair it's restricted to the scope.
cheers pete
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Wouldn't this possibly have unintended consequences, or would the scope
of the overrides be restricted to the define in this case?
Trevor
On 12/22/2009 08:14 AM, R.I.Pienaar wrote:
> hello,
>
> You can use the ability to set defaults for resources:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I'm not sure if this will work as I haven't tested it, but try setting
source and content to 'undef' (no quotes) instead of false.
Trevor
On 12/22/2009 08:00 AM, Daniel Pittman wrote:
> G'day.
>
> I sometimes want to write a 'define' that wraps some
hello,
You can use the ability to set defaults for resources:
define mfile($content = undef, $source = undef) {
if $content {
File[$name] {
content => $content
}
} else {
File[$name] {
G'day.
I sometimes want to write a 'define' that wraps some higher level behaviour
around a low level 'file' statement, akin to this:
define example ($source = false, $content = false) {
file { "/path/to/whatever/${name}":
ensure => file, source => $source, content => $content,