Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If the human-readable text file is newer than the database file, (re)create
This solves the issue outlined in #113 & #114 but in a different way; the
creates
attribute is not useful here.https://docs.puppet.com/puppet/latest/type.html#exec-attribute-creates
A file to look for before running the command. The command will only run if the file doesn’t exist.
If the file does exist, but the originating resource is updated, the .db file is not recreated.
Here's a quick example:
Now, change
file1
:The puppet output isn't helpful here -
file2
is "triggered" but because the file already exists it actually doesn't update.The fix: