我有以下代码不执行,如果software_version等于12 但not_if不工作,我不知道我使用的语法是否正确。如何测试变量与厨师not_if警卫
software_version = `command that pulls version`
bash 'extract_installer' do
cwd '/opt/tmp/'
code <<-EOH
tar -xvf #{cwd}/#{r_file}
....
...
EOH
not_if "software_version".equal?(12)
end
我相信“software_version”变量包含一个字符串,你用整数比较。你可以请做一个小调试“放”的呢? –