puppet sub-folders

232 views
Skip to first unread message

Jason Hatman

unread,
Apr 29, 2014, 2:41:50 PM4/29/14
to puppet...@googlegroups.com
My manifests folder is getting pretty full and a little messy.  Can I create directories in my manifests folder for my main module?  Does puppet understand to look in the folders or will this mess everything up?

Jason Hatman

unread,
Apr 29, 2014, 2:44:19 PM4/29/14
to puppet...@googlegroups.com
I suppose I should have mentioned that I'm using a Puppetmaster server to dish out all of my manifests.

Christopher Wood

unread,
Apr 29, 2014, 3:10:24 PM4/29/14
to puppet...@googlegroups.com
Sounds like it's time for you to start using modules:

http://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html

For interest's sake, my manifest has only a two-line site.pp. Everything else is modules or hiera.

Yumrepo <| |> -> Package <| |>
hiera_include('hclasses')
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [1]puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> [2]https://groups.google.com/d/msgid/puppet-users/e383440a-fc89-40cb-905a-b5f9b23df029%40googlegroups.com.
> For more options, visit [3]https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:puppet-users...@googlegroups.com
> 2. https://groups.google.com/d/msgid/puppet-users/e383440a-fc89-40cb-905a-b5f9b23df029%40googlegroups.com?utm_medium=email&utm_source=footer
> 3. https://groups.google.com/d/optout

Jason Hatman

unread,
Apr 29, 2014, 3:13:56 PM4/29/14
to puppet...@googlegroups.com, christop...@pobox.com
I'm using modules right now.  However, I have 90% of my manifests in one module.  My site.pp is also very small. Should I break them up into different modules?  I really haven't put much thought into that because I didn't have very many manifests at first.  Now, my library is growing rapidly.

Christopher Wood

unread,
Apr 29, 2014, 3:18:21 PM4/29/14
to puppet...@googlegroups.com
The answer is a qualified "yes", since little chunks of functionality are going to be easier for you to maintain than a single large module.

Later on you can look into hiera and other useful stuff.
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [1]puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> [2]https://groups.google.com/d/msgid/puppet-users/e209ce43-c017-4cdc-ae16-e5d50b78b071%40googlegroups.com.
> For more options, visit [3]https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:puppet-users...@googlegroups.com
> 2. https://groups.google.com/d/msgid/puppet-users/e209ce43-c017-4cdc-ae16-e5d50b78b071%40googlegroups.com?utm_medium=email&utm_source=footer
> 3. https://groups.google.com/d/optout

José Luis Ledesma

unread,
Apr 29, 2014, 4:04:08 PM4/29/14
to puppet...@googlegroups.com

Moreover you may create subdirectories,  for example if you declare the class:
namex::namey::namez

The autolader would look for the manifest:
$moduledir/namex/manifests/namey/namez.pp

Regards,

To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140429191821.GA7530%40iniquitous.heresiarch.ca.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages