Skip to content

sSpeaker/Puppet_SS

Repository files navigation

Module Structure:

my_module - This outermost directory's name matches the name of the module.

  • manifests/ - Contains all of the manifests in the module.
    • init.pp - Contains a class definition. This class's name must match the module's name.
    • install.pp - Contains a class named my_module::install.
    • service.pp - Contains a class named my_module::service.
    • config.pp - Contains a class named my_module::config.
  • files/ - Contains static files, which managed nodes can download.
  • lib/ - Contains plugins, like custom facts and custom resource types.
  • templates/ - Contains templates, which can be referenced from the module's manifests.
  1. Init.pp contains a parameterized class named my_class where we describe all the module's defaults. Defaults can be overridden through ENC. Inside this class we operate with variables depending on the different facts, like OS or another variables. Also we must describe ordering and include all the classes at the end of our parameterized class.
 Class['my_class::install']-> Class['my_class::config'] -> Class['my_class::service']
 include my_class::install, my_class::config, my_class::service
  1. Install.pp contains package resource that installs needed software depending on the variables described in init.pp
  2. Config.pp contains resources to create and manage directories/files (like modes, owner and groups, contents etc.). All parameters are described in init.pp
  3. Service.pp contains a class that manages states of required service depending on the variables described in init.pp.

Each of the classes can be turned off/on using variables in init.pp like:

$my_class::my_class_manage_service = true

All the code must be checked by puppet-lint

External links:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published