Issue #2408 has been updated by Raffael Schmid.

I thought about this when taking a shower this morning. From a sysadmin point 
of view, it would be the easiest if we could provide a yaml which looks like:
<pre>
classes:
  common:
  apt:
resources:
  - "add local repo":
    type: "apt::repo"
    ensure: present
    content: "deb localrepo.magpie.lan/ubuntu lucid vendor"
  - "touch restart.txt":
    type: "exec"
    user: "root"
    command: "touch /var/www/rails/tmp/restart.txt"
    unless: "/var/www/rails/tmp/restart.txt"
    require:
      - file: "/var/www/"
      - file: "/var/www/rails"
</pre>

This would evaluate to something like this:
<pre>
irb> pp YAML.load(File.open("/tmp/l"))
{"resources"=>
  [{"type"=>"apt::repo",
    "content"=>"deb localrepo.magpie.lan/ubuntu lucid vendor",
    "ensure"=>"present",
    "add local repo"=>nil},
   {"command"=>"touch /var/www/rails/tmp/restart.txt",
    "type"=>"exec",
    "require"=>[{"file"=>"/var/www/"}, {"file"=>"/var/www/rails"}],
    "unless"=>"/var/www/rails/tmp/restart.txt",
    "user"=>"root",
    "touch restart.txt"=>nil}],
 "classes"=>{"common"=>nil, "apt"=>nil}}
</pre>

Is this something you meant? Or did you mean something else by "helping to 
define a plan"? :)
----------------------------------------
Feature #2408: It should be possible to assign a definition to a node in an 
external nodes tool
https://projects.puppetlabs.com/issues/2408

Author: Pieter Barrezeele
Status: Needs More Information
Priority: High
Assignee: 
Category: 
Target version: Telly
Affected Puppet version: 0.24.8
Keywords: 
Branch: 


Until now, only classes/modules and parameters can be assigned to nodes in an 
external nodes tool.

It would be very useful to be able to assign a definition, such as:

<pre>
node ws1 inherits webserver {
        apache::vhost{"www.example.com"}
}
</pre>

to a node using yaml. The only other way to do now, seems to be writing wrapper 
classes.

Thanks,

Pieter.




-- 
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