puppetlabs-ruby
puppetlabs-ruby copied to clipboard
switch to ensure_packages()
The ruby module is used as a dependency in many other component modules.
Some of them also define the ruby package or any of the other packages
here. This leads to duplicate resources and a failing catalog. As a
workaround I migrated all package resources to ensure_packages() from
stdlib and increased the minimal stdlib version from 4.13.1 to 4.19.0.
I'm not 100% sure this will help. ensure_packages() uses ensure_resources where parameters still have to match to avoid duplicate resources.
If the resource already exists, but does not match the specified parameters, this function attempts to recreate the resource, leading to a duplicate resource definition error.
@alexjfisher correct, it only helps if the parameters are identical. But it should still help alot.
Or maybe not help at all. You're specifying a bunch of parameters for each package resource, so these are almost guaranteed not to match existing resources.
But the require and before metaparameters might be handled differently and not need to match. Not sure. Also, if the package is already in the catalog, will the relationships declared in this manifest get used??
@alexjfisher updated it, should be much cleaner now :)
It would be nice if one could finally review this :)
@tphoney I offer to fix those CI issues if you merge the PRs and do a 1.0.0 release afterwards :)