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
package ignore_failure doesn't work with notification #5685
Comments
That isn't a bug or isn't a fixable bug. The code that would set the resource as being updated is never getting executed because of the exception being thrown. Maybe there needs to be some way to notify-on-failure. But ignore_failure is usually a signal of abuse of the system. The code should really protect itself against that -- just write ruby code to detect if the command needs to run: def need_to_fix_dependencies?
if [ ... something .... ]
return true
end
end
execute 'fix-dependencies-for-oracle-java8-jdk' do
command 'apt-get -yf install'
only_if { need_to_fix_dependencies? }
end |
maybe something along those lines (typed from memory, before coffee) |
Hi,
We'll be closing your ticket, since we try to keep this for issues in Chef. |
Looks like notify doesn't work with ignore_failure. I'm not sure is it feature or bug:
Result:
Chef Version: '~> 12.14' (12.14.89)
Related to #2598
The text was updated successfully, but these errors were encountered: