Issue #1858 has been updated by Lluis Gili.

Status changed from Re-opened to Closed

I found create_resources function which adds same functionality than this patch.
I close this (although I prefer the patch syntax)

for the first example, what was:
    file {$symlinks:}

with create_resources function is:
    create_resources(file, $symlinks)
----------------------------------------
Feature #1858: Add resources based on a Hash
https://projects.puppetlabs.com/issues/1858

Author: David Escala
Status: Closed
Priority: Normal
Assignee: Luke Kanies
Category: newfeature
Target version: 2.7.x
Affected Puppet version: 0.24.7
Keywords: 
Branch: 


Create resources from a Hash, in fact the syntax for a resource looks like a 
Ruby Hash already. The idea is to use it in conjuntion with external_nodes or 
with functions which return hashes.

I'll explain it with an en example. 

With this external_nodes yaml
<pre>
parameters:
  symlinks:
    /tmp/one:
       ensure: target1
    /tmp/two:
       ensure: target2
classes:
- foo_class
</pre>

and a this manifest:
<pre>
file {$symlinks:}
</pre>

Puppet should create two file resources /tmp/one and /tmp/two.

This feature allows the creation of simple resources, like a list of users or 
cron jobs, outside puppet.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to