Ask Your Question

Should I put role modules in their own section of $modulepath?

asked 2013-03-06 15:48:04 -0600

llowder gravatar image

updated 2013-03-08 08:39:26 -0600

I've been moving my modules towards a Roles and Profiles setup, and such the number of modules in my main module directory has been growing. I believe the current count is 57.

I've been considering adding to my modulepath, which is currently $confdir\environments\${::environment}\modules:$confdir\modules. I'm thinking of prepending $confdir\environments\${::environments}\roles\modules: and then putting all the role and profile specific modules there, leaving the application level modules (almost all written in house) in $confdir\environments\${::environment}\modules and the utility modules (stdlib, concat, puppetdbquery etc) in $confdir\modules.

While this makes ... (more)

edit retag flag offensive close merge delete


We just started testing the exact same setup.

Ancillas gravatar imageAncillas ( 2013-03-06 15:54:57 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-03-08 08:31:49 -0600

Daenney gravatar image

I believe this is a simple matter of preference. If that setup works better for you / you find it cleaner that way by all means, feel free to organise it that way.

Wether this will be a hindrance for your colleagues, you'll have to ask them and as far as those next in line go, nothing beats good docs.


  • I'm in doubt about the utility functions, those will be shared across all environments except if there's a identically named module in modulepath that is found prior to searching $confdir\modules. That part might become very confusing ...

edit flag offensive delete link more


The utility modules are ones that we intentionally share acorss our environments - things like concat and stdlib. I plan on having the profiles be classes of their roles, like in

llowder gravatar imagellowder ( 2013-03-08 08:51:37 -0600 )edit

I understand you're currently sharing your utility modules across environments but what happens when you want to test a new version of a utility module in an environment?

Daenney gravatar imageDaenney ( 2013-03-09 17:09:04 -0600 )edit

I'll do that using a separate master that is spun up for just that purpose - all are environments are essentially production of some sort as far as puppet is ...(more)

llowder gravatar imagellowder ( 2013-03-15 08:13:15 -0600 )edit

answered 2013-03-08 08:34:42 -0600

ashp gravatar image

I do note the new path lacks ${::environment} meaning it would be hard to test new roles and profiles but other than that it would definitely keep your path clean. I kind of like the move towards seperating out the different kinds of modules to different locations.

edit flag offensive delete link more


that was an oversight on my part, I'll edit the answer to fix that.

llowder gravatar imagellowder ( 2013-03-08 08:37:57 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-03-06 15:48:04 -0600

Seen: 997 times

Last updated: Mar 08 '13