Reputation: 846
In Puppet 3, I would like to be able to branch within a manifest based on the installed version of an RPM package. I figured it would be as simple as looking up the version
(or ensure
?) attribute on the package resource and using that in a conditional expression. But for the life of me, I can't figure out how to get a resource's attributes from outside the resource, even after combing through the reference manual.
Upvotes: 1
Views: 630
Reputation: 19987
Unfortunately, it isn't possible to access a resource's attribute. Have a look at a similar question I recently asked. If you base your package version on a class attribute, hiera data or both you can use those to base your condition on.
Upvotes: 1