Closed timurb closed 10 years ago
hostsfile_entry resource always send notifies even when no action is taken:
hostsfile_entry
* file[/etc/hosts] action create (up to date) - Append hostsfile_entry[localhost]
This is caused by construction like https://github.com/customink-webops/hostsfile/blob/master/providers/entry.rb#L34-L44 which does not look like it is correct: converge_by is used for better support on why_runs (if I got that correctly from docs) while the File resource used to create the /etc/hosts supports that by itself.
converge_by
/etc/hosts
Opscode also says that this kind of usage of converge_by is incorrect: you first need to decide if you need to update the resource and run converge block only after that.
Thank you for the report. I would gladly review a PR to fix this functionality.
hostsfile_entry
resource always send notifies even when no action is taken:This is caused by construction like https://github.com/customink-webops/hostsfile/blob/master/providers/entry.rb#L34-L44 which does not look like it is correct:
converge_by
is used for better support on why_runs (if I got that correctly from docs) while the File resource used to create the/etc/hosts
supports that by itself.Opscode also says that this kind of usage of
converge_by
is incorrect: you first need to decide if you need to update the resource and run converge block only after that.