Close

Puppet – Best practice to writing modules

the ntp module is an example of a really well written module.

Announcement

I have released my new course on Udemy, Kubernetes By Example. Sign up now to get free lifetime access!

https://docs.puppetlabs.com/guides/module_guides/bgtm.html

any yum related activicivities should reside in it’s own manifest called: install.pp
any config file related activities should reside in it’s own manifest called: config.pp
any service start/stop related activities should reside in it’s own manifest called: service.pp

These are best practice, although I don’t think they are mandatory.

All class parameters should have default values, so that people can use the module just be calling “include class_name”. All the default parameter values should be defined in it’s own manifest, which we should call params.pp.