Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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