0
votes

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.

1
I read groups.google.com/forum/m/#!msg/puppet-users/tM37SRqKgWs/… but the following actions that actually need the dependency to succeed will fail. That is why I need this separation between hard and soft dependencies. - Warren Seine
You might try manifest ordering. Not clear to me if that creates a "soft" dependency or not. puppetlabs.com/blog/introducing-manifest-ordered-resources docs.puppetlabs.com/learning/… - freiheit
Thanks, but this workaround is not enough for me. - Warren Seine

1 Answers

1
votes

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.