Module bodepd/create_resources
| Download |
|
Module description
This module has been added to backport the create_resources function to 2.6.4 - 2.6.8.
It has been merged into core in 2.7.0.
The function can be used to convert hashes into resources.
$users3 = {
'dannyboy454' => {
'user_name'=>'dlfjdslkf',
'ensure'=>present,
'require' => 'User[foobar]',
'before' => 'User[sally-mae]'
},
'bobby-joe' => {'ensure'=>present}
}
create_resources('create_resources::user', $users3)
This works for resource types as well as defined resources and classes.
This was originally written to be used together with an ENC.
Resources can be programitally generated as yaml and passed to a class.
classes:
webserver::instances:
instances:
instance1:
foo: bar
instance2:
foo: blah
Then puppet code can consume the hash parameters and convert then into resources
class webserver::instances (
$instances = {}
) {
create_resources('webserver::instance', $instances)
}
Now I can dynamically determine how webserver instances are deployed to nodes
Release notes for version 0.0.1
initial release
Search Modules
Module's releases
Add a module