覆盖chef bash返回代码

我正在运行一个厨师收件人来安装Websphere fixpacks. fixpack retuns和exitcode [2]用于部分安装.这是一种预期的行为,但厨师只是将其视为错误.有没有办法覆盖它.

我希望厨师继续完成下一个任务,即使返回退出代码是[2]

================================================================================
Error executing action `run` on resource 'bash[was-install-fixpacks]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0],but received '2'
快速浏览一下 documentation可以看出参数返回:

The return value for a command. This may be an array of accepted values. An exception is raised when the return value(s) do not match. Default value: 0.

例:

bash "was-install-fixpacks" do
  command ..
  returns [0,2]
end

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...