Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Attempting to install file only if it is downloaded and/or modified #73
Hi @arifcse019, thanks for the PR, it's indeed always a chicken and egg problem with downloaded resources and installation.
Here's a scenario I've encountered a lot, let's say we've downloaded the file but chef run was kill afterwards, then we already have the file, on the next run
This would cover the
What do you think?
On a second thought, I am not sure if the solution above will prevent chef from installing the package even if the package is already installed. I think repeating the same guard for both downloading and installation is the best way.
I have captured the guard string in a separate variable such that we do not have to update it in two places if needed
Hello @arifcse019, thanks for your work and your thoughts on this issue, I've merged your commits and switch back to remote_file to
It's a little more work when changing the Grafana version, but I've found it's the best way to prevent all kind of problems (file re-download, partial file, wrong file, etc).
Thanks again for your participation!