hiera_createresource
create puppet resources with a single hiera call
Version information
released Sep 29th 2014
Start using this module
Add this module to your Puppetfile:
mod 'ajaz-hiera_createresource', '0.1.1'
Learn more about managing modules with a PuppetfileDocumentation
ajaz/hiera_createresource — version 0.1.1 Sep 29th 2014
hiera_createresource
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Usage - Configuration options and additional functionality
- Contributing - Guide for contributing to the module
Overview
create puppet resources with a single hiera call
Module Description
this module installs hiera_class and hiera_define via autoload
- hiera_class create a new class resource from a hash with the given name in hiera
- hiera_define creates multible resources from by readinf a hash with tow layes in hiera
Usage
hiera_class("name")
create a class from a hiera hash
- hash in hiera ( common.yaml)
openldap::client: uri: '_ldap._tcp.example.com' base: 'dc=exampl,dc=com' ssl_cert: '/etc/ssl/certs/ca-certificates.crt' ssl_reqcert: 'hard'
- code in site.pp
node default { hiera_class('openldap::client') }
hiera_define("name")
-
create defined class from hiera hash
bind9::record::a: _ldap: zone: '_ldap.example.com' data: - '10.0.0.3' ptr: true dc01: zone: 'example.com' data: - '10.0.0.3' ptr: true
-
code in site.pp
node default { hiera_define('bind9::record::a') }
Contributing
-
Fork it
-
Create your feature branch
git checkout -b my-new-feature`
-
Commit your changes
git commit -am 'Added some feature'
-
Push to the branch
git push origin my-new-feature
-
Create new Pull Request