hash_resources

Pass a hash to create various types of resources, best used with an ENC

Stephen Benjamin

stbenjam

12,843 downloads

5,145 latest version

5.0 quality score

Version information

  • 2.0.0 (latest)
  • 1.0.1
  • 1.0.0
released Jun 27th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >=4.0.0 < 6.0.0
  • RedHat
    ,
    CentOS
    ,
    OracleLinux
    ,
    Scientific
    ,
    SLES
    ,
    Debian
    ,
    Ubuntu
    ,
    Solaris
    ,
    Windows
    ,
    AIX

Start using this module

Documentation

stbenjam/hash_resources — version 2.0.0 Jun 27th 2018

Puppet Forge Build Status

hash_resources

This module takes a hash called 'resources' and uses that to pass each one to create_resources.

Often modules on puppet forge contain defines, which can't be used by an External Node Classifier directly, and you often need to write a wrapper class.

Using this module, you can pass many defines, classes, and built-in types for creation.

Examples

class { 'hash_resources':
  resources => {
    'file': {
      '/tmp/foo': {
        'ensure'   => 'present',
        'content' => 'test',
      },
      '/tmp/bar': {
        'ensure'   => 'present',
        'content' => 'test',
      }
    }
  }
}
---
classes:
  hash_resources:
    resources:
      file:
        /tmp/foo:
          ensure: present
          content: test
        /tmp/bar:
          ensure: present
          content: test