Quantcast
Viewing latest article 18
Browse Latest Browse All 75

How to list all resources of a certain type?

Can a Puppet-manifest (or an ERB-template) enumerate through _all_ defined resources of a particular type? For example, I want to list all of the Puppet-managed users -- can I list all of the `User`-resources as a hash and go through it? For another example, I'd like to go through all of the tomcat-instances on a machine -- such as to set up log-rotation for all of the `catalina.out`s... We use Puppet-3.8 and a recent version of Puppet stdlib... (I found some references to `findresource`-function, but trying to call it from inside a template fails.)

Viewing latest article 18
Browse Latest Browse All 75

Trending Articles