Issue #3764 has been updated by Alan Barrett.
Nigel Kersten wrote:
> For some of our services we need private keys that we don't check into
> puppet. [...]
> I currently do this with a nasty exec resource to test for existence
I do much the same, using an exec resource that prints a message and fails if
the file does not exist, and a file resource that depends on the exec, so it
will either be skipped due to failed dependencies, or will set ownership and
permissions if the file does exist. I'd prefer to replace the exec with a
notify:
<pre>
notify { $title:
message => "explain what has to be done to create $filename",
fail => true,
unless => "/bin/test -f $filename",
}
file { $filename:
owner => $owner, group => $group, mode => $mode,
require => Notify[$title],
}
</pre>
----------------------------------------
Feature #3764: Add "fail" parameter to notify resource
http://projects.puppetlabs.com/issues/3764
Author: Alan Barrett
Status: Needs design decision
Priority: Normal
Assigned to: Luke Kanies
Category: functions
Target version:
Affected version: 0.25.4
Keywords:
Branch:
I often want a puppet manifest to result in an error on the client. This is
useful for marking "to do" items, where users should be reminded of
shortcomings in the manifest.
I have added a "fail" parameter to the notify resource. Usage is as follows:
<pre>
notify { "Feature X is not yet implemented":
fail => true,
}
</pre>
I attach a patch to implement this feature, but I have not added test cases.
It would be nice to have "onlyif" and "unless" parameters, but I have not
implemented those.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.