Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module always seems to notify even with cache #48

Open
matthewfischer opened this issue Jun 1, 2015 · 5 comments
Open

module always seems to notify even with cache #48

matthewfischer opened this issue Jun 1, 2015 · 5 comments

Comments

@matthewfischer
Copy link

Even with cache enabled, I always get notifications from my wget::fetch resources. Is this a known issue or something I'm doing wrong with the cache? I can see by the datestamp that the file is not updating if the cached version doesn't change.

@matthewfischer
Copy link
Author

I figured out a work around by subscribing to the files, not the wget::fetch.

@echaz
Copy link

echaz commented Jun 18, 2015

Super helpful, thanks @matthewfischer . This should be in the README.

@carlossg
Copy link
Member

Can you submit a PR for the README ?

@jonmosco
Copy link

Is there any examples of the solution?

@matthewfischer
Copy link
Author

Here's an example, not sure how to write this up more cleanly, but here's how I do the icinga reload after a wget downloaded file changes:

exec { 'reload_icinga':
  command     => '/usr/sbin/service icinga reload',
  refreshonly => true,
  subscribe   => [File["/etc/nagios/nagios_hostgroup.${backup_site_iteration}.cfg"],
                  File["/etc/nagios/nagios_service.${backup_site_iteration}.cfg"],
                  File["/etc/nagios/nagios_host.${backup_site_iteration}.cfg"]],
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants