In my Puppet (2.6) module definition, I create user accounts by declaring them as virtual resources; today they take the form @useraccount('name'=>'joe') and @useraccount('name'=>'mary') within a single class, which then gets include-ed when I want to realize them all (i.e. include useraccounts followed by Useraccount <| |>).

I would like to move these individual @useraccount definitions into separate files so I can better manage users individually. But it doesn't appear that the include command allows for a wildcard (i.e. include useraccounts/* where I would then maintain one file per user in the useraccounts subdir)

Is there a better way to do this?

Thank you.


You can use import:

If you put this in seperate files in manifests/users/*.pp, you can import it by including this in your site.pp:

import "users/*.pp"

Kind regards, Ger.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.