[英]Ordering relation with no dependency on success with Puppet
Adding a require
relation with Puppet means the current resource will be skipped if the required dependencies fails. 使用Puppet添加require
关系意味着如果所需的依赖项失败,则将跳过当前资源。
Is it possible to keep the ordering relation but continue the execution even if the dependency failed? 即使依赖项失败,是否可以保留排序关系但继续执行?
Typically, I want to trigger a build after upgrading a package list. 通常,我想在升级软件包列表后触发构建。 If the internet connection is down, the package
resource will likely fail but I'd like the build to happen anyway. 如果Internet连接断开,则package
资源可能会失败,但是我还是希望构建能够进行。 I initially though that was the point of subscribe
, but there doesn't seem to be any difference with require
in my case. 我最初虽然是subscribe
的要点,但在我的情况下与require
似乎没有任何区别。
There is simply no way to do that, and this is against Puppet's design. 根本没有办法做到这一点,这与Puppet的设计背道而驰。
I managed to fix my issue by: 我设法通过以下方式解决了问题:
|| true
使用|| true
|| true
workaround mentioned on the mailing list . 邮件列表中提到了|| true
解决方法。 Edit : In the end, that wasn't really maintainable. 编辑 :最后,那并不是真正可维护的。 Switched to Ansible . 切换到Ansible 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.