Giter VIP home page Giter VIP logo

puppet-module-loader's Introduction

puppet-module-loader

A Puppet module to load other Puppet modules, i.e. include classes into the manifest.

The purpose of puppet-module-loader is to allow both adding to and removing from the list of classes defined in Hiera.

Build Status

Background


The common pattern for loading modules (classes) through Hiera is to use the array-type parameter "classes". The classes specified in this array is typically loaded into the manifest by hiera_include("classes") in site.pp.

While it is possible to add items to the classes array in different levels of Hiera, it is not possible to remove a class name already in the list.

This drives a Hiera pattern where e.g. common.yaml can only contain the minimal set of common modules to load. There is no way to define any exceptions.

Compatibility


The loader module is built for use with both Puppet 3.x, 4.x and 5.x. The module is platform independent.

Examples


Include basic set of modules in Hiera common.yaml:

loader::classes:
  hosts:   true
  ntp:     true
  pam:     true
  rsyslog: true
  ssh:     true

Include additional modules in a group, e.g. groups/webserver.yaml:

loader::classes:
  apache:     true
  postgresql: true

Exclude modules from a particular host, e.g. fqdn/host1.example.com.yaml:

loader::classes:
  hosts: false
  ssh:   false

Parameters


ensure

The string 'present' or 'absent'. If 'present' the loader module will be active, otherwise it will have no effect.

  • Default: 'present'

classes

A hash specifying the modules to include. The key is the module name and the value is a boolean. If the value is true the module will be included, if the value is false it will not be included.

  • Default: {}

hiera_merge

A boolean controlling whether the classes parameter should be merged together from all instances of loader::classes in Hiera.

  • Default: true

puppet-module-loader's People

Contributors

nyren avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.