[Puppet Users] Hash and loops

2014-01-26 Thread Jose Luis Ledesma
Hello,

You should look the create_resources:

http://docs.puppetlabs.com/references/latest/function.html#createresources

Regards,

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a7f77bab-122a-47d5-ad7e-df152f32f152%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Hash and loops

2014-01-26 Thread Thomas Bendler
Hi @all,

I try to pass a hash to a module class like this:

class { 'modulename':
  filecontent => {
name1 => 'value1',
name2 => 'value2',
...
namex => 'valuex',
  }
}

​The class should take the hash list, loop over the list and create i.e.
file resources with namex and content valuex. What is the best way to do
this and, even more important, is it possible to do something like this?

Regards Thomas​
-- 
Linux ... enjoy the ride!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAELoU1OamZnZKmOK7bn1wSPoc5bafNT_xBthDUPzikASy9n45A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.