{"id":471,"date":"2009-09-28T21:31:57","date_gmt":"2009-09-28T20:31:57","guid":{"rendered":"http:\/\/wp.devco.net\/?p=471"},"modified":"2012-12-13T01:41:48","modified_gmt":"2012-12-13T00:41:48","slug":"simple_puppet_module_structure","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2009\/09\/28\/simple_puppet_module_structure.php","title":{"rendered":"Simple Puppet Module Structure"},"content":{"rendered":"

Note:<\/B> While this post is still relevant, you should also check the newer Simple Puppet Module Structure Redux<\/a> post<\/p>\n

Puppet<\/a> supports something called Modules<\/a>, it’s a convenient collection of templates, files, classes, types and facts all related to one thing.\u00a0 I find it makes it easy to think about a problem in an isolated manner and it should be the default structure everyone use.<\/p>\n

Usually though the problem comes with how to lay out modules and how to really use the Puppet classes system, below a simple module layout that can grow with you as your needs extend.\u00a0 I should emphasis the simple here – this example does not cater well for environments with mix of Operating Systems, or weird multi site setups with overrides per environment, but once you understand the design behind this you should be able to grow it to cater for your needs.\u00a0 If you have more complex needs, see this post as a primer on using the class relationships effectively.<\/p>\n

For the most part I find I make modules for each building block – apache, syslog, php, mysql – usually the kind of thing that has:<\/p>\n