{"action":"created","issue":{"url":"https://api.github.com/repos/maestrodev/puppet-wget/issues/52","labels_url":"https://api.github.com/repos/maestrodev/puppet-wget/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/maestrodev/puppet-wget/issues/52/comments","events_url":"https://api.github.com/repos/maestrodev/puppet-wget/issues/52/events","html_url":"https://github.com/maestrodev/puppet-wget/issues/52","id":100872908,"number":52,"title":"File does not get updated when the file is updated","user":{"login":"dannythk","id":7926259,"avatar_url":"https://avatars.githubusercontent.com/u/7926259?v=3","gravatar_id":"","url":"https://api.github.com/users/dannythk","html_url":"https://github.com/dannythk","followers_url":"https://api.github.com/users/dannythk/followers","following_url":"https://api.github.com/users/dannythk/following{/other_user}","gists_url":"https://api.github.com/users/dannythk/gists{/gist_id}","starred_url":"https://api.github.com/users/dannythk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannythk/subscriptions","organizations_url":"https://api.github.com/users/dannythk/orgs","repos_url":"https://api.github.com/users/dannythk/repos","events_url":"https://api.github.com/users/dannythk/events{/privacy}","received_events_url":"https://api.github.com/users/dannythk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-13T21:29:05Z","updated_at":"2015-08-17T21:27:29Z","closed_at":null,"body":"My code: \r\n\r\nwget::fetch { 'somefile':\r\n    source      => \"someURL\",\r\n    destination => \"destFilePath/fileName\",\r\n    timeout     => 0,\r\n    verbose     => false,\r\n}\r\n\r\nWhen I alter the destination file, puppet run does not revert my destination file back to the source file.\r\nWhen I alter the source file, puppet run does not update my destination file with the latest update.\r\nThe only time it fetch for the file is when I remove the destination file....Is there a way that I could use this module to pull the file similar to \"file\" resource type?  I am not able to use the \"File\" resource because it is not located inside the Puppet master server.  \r\n\r\nI also try to put in the cache_dir:\r\n\r\nwget::fetch { 'somefile':\r\n    source      => \"someURL\",\r\n    destination => \"$destFilePath/fileName\",\r\n    cache_dir   => '/var/cache/wget',\r\n    timeout     => 0,\r\n    verbose     => false,\r\n}\r\n\r\nUsing the cache_dir works great!!  But if the source and destination files are identical, the \"wget:fetch\" still run as normal.  That would give Puppet a false alert that \"something\" change.  "},"comment":{"url":"https://api.github.com/repos/maestrodev/puppet-wget/issues/comments/131967459","html_url":"https://github.com/maestrodev/puppet-wget/issues/52#issuecomment-131967459","issue_url":"https://api.github.com/repos/maestrodev/puppet-wget/issues/52","id":131967459,"user":{"login":"carlossg","id":23651,"avatar_url":"https://avatars.githubusercontent.com/u/23651?v=3","gravatar_id":"","url":"https://api.github.com/users/carlossg","html_url":"https://github.com/carlossg","followers_url":"https://api.github.com/users/carlossg/followers","following_url":"https://api.github.com/users/carlossg/following{/other_user}","gists_url":"https://api.github.com/users/carlossg/gists{/gist_id}","starred_url":"https://api.github.com/users/carlossg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlossg/subscriptions","organizations_url":"https://api.github.com/users/carlossg/orgs","repos_url":"https://api.github.com/users/carlossg/repos","events_url":"https://api.github.com/users/carlossg/events{/privacy}","received_events_url":"https://api.github.com/users/carlossg/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T21:27:29Z","updated_at":"2015-08-17T21:27:29Z","body":"Using cache it calls wget with -P, you can get the full command line running puppet win debug mode and see if calling wget directly the behavior is the same. \r\nThe way -P works is documented in http://www.gnu.org/software/wget/manual/wget.html#HTTP-Time_002dStamping-Internals\r\n\r\nFor the notification see #48 \r\n"}}