capsi-informatique / puppet-resources

Allow creating ressources directly from Hiera

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

resources

Allow creating resources directly from Hiera

Table of Contents

  1. Description
  2. Usage - Configuration options and additional functionality
  3. Development - Guide for contributing to the module

Description

With this module, you can create a Hash in your Hiera files to automatically create the corresponding ressouces in Puppet via the create_resources function.

Usage

You just need to include the class in your puppet code or in Hiera if you configured it :

In your Puppet code

include resources

# OR

class { resources:
}

In Hiera

site.pp:

lookup('classes', { merge => unique, default_value => [] }).include

hiera.yaml:

---
classes:
  - resources

Usage

You can change the merge behavior of the lookup, by default, no merge behavior is set and the one set in Hiera is used:

resources::merge_behavior: deep

Or:

class { resources:
  merge_behavior => deep,
}

Once you included the class, you can declare the resources like this:

resources:
  resource_type:
    resource_tittle:
      arg1: 'string value'
      arg2: 123
      arg3: false

You can check the examples/hiera.yaml for a real world examples

Release Notes/Contributors/Etc.

Release 1.0.0

Initial Release

About

Allow creating ressources directly from Hiera

License:Apache License 2.0


Languages

Language:Puppet 100.0%