Adding a require relation with Puppet means the current resource will be skipped if the required dependencies fails.

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. I initially though that was the point of subscribe, but there doesn't seem to be any difference with require in my case.

有帮助吗?

解决方案

There is simply no way to do that, and this is against Puppet's design.

I managed to fix my issue by:

  • reordering dependencies so there is a single action to do after the soft dependency
  • using the || true workaround mentioned on the mailing list.

Edit: In the end, that wasn't really maintainable. Switched to Ansible.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top