-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default recipe unzip is not idempotent and always runs #25
Comments
EDIT: checked code and checksum is set so likely the below edit is the only way to ensure idempotence. i will test out something and see to submit a PR P.S. this was tried on 3.0.2 and the latest pull from master with the same result. EDIT: missed this part in the readme: Be sure to use the not_if or only_if meta parameters to guard the resource for idempotence or action will be taken every Chef run. looks like well have to add a not if the unzipped binary already exists or something like that to ensure idempotence of the zip resource |
ok so adding this after line 15 in the default recipe fixed the unzip happening on every run but I'm certain this wont work in all cases and will probably break everything and is not the right way to solve it so i wont submit a PR for it yet but here is the working line:
|
ok so i managed to fix chef_spec errors but it looks like my fix above doesnt work when the file doesnt yet exist. will have to revisit that perhaps after some feedback from you guys or some more learning. |
The windows_zipfile resource doesn't look like its idempotent so it always runs with every chef run triggering the notifications associated with the nssm resource on every run even if the file hasn't changed.
I am not too familiar with windows_zipfile so am unsure if theres a way to make it idempotent. if not perhaps consider Poise Zip which iirc is idempotent although im not too keen on adding another dependency to nssm cookbook.
output from chef run
The text was updated successfully, but these errors were encountered: