【发布时间】:2020-03-27 18:45:39
【问题描述】:
我找到了this question,它非常相似,但是我正在实例上执行测试代码,根据the documentation,这意味着不应该应用防护。但是,它每次都在跳过。任何帮助将不胜感激。
厨师代码:
# Install the DNS plugin for the CLI
execute 'Install-DNS-plugin' do
command 'akamai install dns --force'
not_if 'akamai list | grep dns'
end
总是会导致跳过:
==> default: * execute[Install-DNS-plugin] action run
==> default: (skipped due to not_if)
即使在实例上,保护代码返回 1:
[root@vagrant ~] $ akamai list | grep dns
[root@vagrant ~] $ echo $?
1
【问题讨论】:
标签: chef-infra