Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #create_resource_without_duplicate
- node default {
- $hash = {
- item1 => { value => '1',
- othervalue => 'a',
- somevalue => 'jjj' },
- item2 => { value => '2',
- othervalue => 'b',
- somevalue => 'yyy' },
- }
- $array = keys($hash)
- if ! defined( "testKey{${array} : hash => $hash}}" ){
- testKey{$array : hash => $hash}
- }
- }
- define doAction($value, $othervalue, $somevalue) {
- notify { "Item ${value} ${$othervalue} ${somevalue}": }
- }
- define testKey($hash){
- doAction{"do ${name}" :
- value => $hash[$name]['value'],
- othervalue => $hash[$name]['othervalue'],
- somevalue => $hash[$name]['somevalue'],
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement