ark
ark copied to clipboard
:put action should always unpack the archive file content even if the archive file is unchanged
In some cases, where the unpacked content is modified, and we want to go back to the same state as it were in the past, but the archive under /var/chef/cache/foobar.zip is unchanged from remote_file, we should still it to always unpack the content.
Refer to the line here: https://github.com/burtlo/ark/blob/master/providers/default.rb#L206
So what you would want is a way to say to the ark resource: "Please ignore if the package is updated or not updated. I want the package to be unpacked and the rest of the process be performed"
Is there a way that you would like to specify this?
My first idea is to add an attribute to the resource that overrides the current state of the archive. Of course, that would mean every time the resource would execute it would be taking action. So I don't know if you want to do that or be able to set it another way.
- resource attribute/parameter
- node.run_state
- Any other ideas?
For my use case, an attribute will be fine. I guess you can use run_state too, no strong opinion on that.