On Jan 16, 2009, at 12:24 AM, Ben Beuchler wrote:
>
> I have created a define that needs to be able to notify a Service.
> Everything I''ve read seems to indicate that the resources inside
the
> define should inherit any metaparameters passed into the define.
>
> See:
http://groups.google.com/group/puppet-users/browse_thread/thread/c28aa647e774cc84/0fd4387d029e7e38
>
> I''ve stripped my definition down to the bare minimum and still
can''t
> get this to work:
>
> define cfile( $source, $owner = root, $group = root, $mode = 0444) {
> file { $name:
> owner => $owner,
> group => $group,
> source => $source,
> mode => $mode,
> }
> }
>
> I call it like so:
>
> cfile {"/etc/samhain/samhainrc":
> source => "puppet:///samhain/samhainrc",
> notify => Service["samhain"],
> require => Package["samhain"],
> }
>
> When the file changes, the service is not notified. If I turn this
> into a File resource by just deleting the single "c" at the start
of
> the call, everything works as expected.
>
> What am I screwing up?
This actually all looks right. If you look at the cached catalog, can
you verify that the contained file resource is actually receiving the
''notify'' parameter?
Note that it can be easier to test these things using ''exec''
and
''notify'' resources -- you don''t have to worry about
changing files or
having services.
--
The great aim of education is not knowledge but action.
-- Herbert Spencer
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---