0

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.

mrisher
  • 401
  • 1
  • 5
  • 12

1 Answers1

0

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.

Ger Apeldoorn
  • 565
  • 3
  • 10