Thank you for your reply.

First of, we are kinda aware of that we are not using Puppet as it should 
be used with the "state management service". But Puppet seemed to be the a 
great piece of software with great capabilities.

To our problem. Lets say our site.pp looks like this:

#Site.pp

import "nodes_script"
import "monitor_script"
import "run_script"

node /^linuxnod\d+$/ {
       include nodes_script
}

node 'monitor.rosi.local' {
       include monitor_script
}

All works well with our modules. But we would now like to add the module 
"run_script" to some nodes that can't be "regex:ed". The nodes are present 
in a file named "hosts". Can I in some way include these nodes to the "node 
'<nodes>' { include run_script }" in site.pp? So that the run_script is for 
those nodes presented in "hosts". If not, any suggestion on how we 
can achieve it?

Thanks in advance
 
Den onsdagen den 8:e maj 2013 kl. 15:24:47 UTC+2 skrev jcbollinger:
>
>
> I don't think I understand the question.  I mean, you can use 'import' 
> statements in site.pp to bring in node declarations that are physically 
> located in other files (and that's a common practice), but I don't see how 
> that helps you solve your problem more than just putting the node 
> declarations directly in site.pp would do.
>
> You can also use an external node classifier instead of (or in addition 
> to) node blocks to tell Puppet what classes to apply to your nodes.  As a 
> special case, you can make hiera function as an ENC, so that the data about 
> what classes to apply are obtained from a YAML file on the master.  Again, 
> I'm not sure whether that actually addresses your problem.
>
> The whole idea of driving this with Puppet seems a bit dubious, however.  
> Puppet can do it, but it's not the sort of thing Puppet is designed for, at 
> least as you're casting the problem.  Specifically, Puppet is fundamentally 
> a state management service, not a script runner.  That it can run scripts 
> for you is a component of its state management capabilities, but that 
> should not be your focus.
>
>
> John
>
>

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to