Pass resources as a hash and create them - an ENC wrapper around create_resources
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/puppet/parser/functions
manifests
spec
tests
.fixtures.yml
.gitignore
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
metadata.json

README.md

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