On Tue, Feb 15, 2011 at 11:05, Derek J. Balling <[email protected]> wrote:
[…]
> So I've got two modules, one for "random_app" and one for "dns_config".
> "dns_config" has a file resource "resolv.conf" which is just what the name
> implies.
>
> I want service 'foo' in my random_app module to subscribe to dns_config's
> resolv.conf, and if the resolv.conf changes, to restart. (Because, it's a
> misbehaving app who doesn't just use gethostbyname() calls, but runs its own
> resolver and never looks at resolv.conf again after it starts up.)
>
> I would have thought it'd just be subscribing the service to
> File['dns_config::resolv.conf'] but clearly that didn't work.
service { "foo": require => File["/etc/resolv.conf"] }
That will happily cross modules, completely ignoring that boundary.
(Match the name of the file you give in the other module, obviously.
:)
Regards,
Daniel
--
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <[email protected]>
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en.