On Thu, Sep 1, 2011 at 5:02 PM, Douglas Garstang <doug.garst...@gmail.com>wrote:

> On Thu, Sep 1, 2011 at 4:58 PM, Aaron Grewell <aaron.grew...@gmail.com>wrote:
>
>> And then assign classes based on that.  Standard if logic or case
>> statement as you prefer.
>>
>> On Thu, Sep 1, 2011 at 4:57 PM, Douglas Garstang <doug.garst...@gmail.com
>> > wrote:
>>
>>> On Thu, Sep 1, 2011 at 4:56 PM, Aaron Grewell 
>>> <aaron.grew...@gmail.com>wrote:
>>>
>>>> Create a variable for server_class in your node definition.
>>>>
>>>>
>>>>
>>> And then....?
>>>
>>>
>>> This isn't for logic within puppet manifests. In this particular
> scenario, it's for setting a server class on each node so that I can use
> mcollective against servers matching that class. For example, if I wanted to
> stop apache on the web servers, I can call mc-service httpd restart -F
> "hostclass=webserver" etc.
>
>
http://docs.puppetlabs.com/mcollective/reference/ui/filters.html

$ mco rpc --help . . . Host Filters -W, --with FILTER Combined classes and
facts filter -F, --wf, --with-fact fact=val Match hosts with a certain fact -C,
--wc, --with-class CLASS Match hosts with a certain config management class -A,
--wa, --with-agent AGENT Match hosts with a certain agent
-I, --wi, --with-identity IDENT Match hosts with a certain configured
identity



You want to match a class, not a fact.

MCollective can match based on Puppet classes already by reading classes.txt
which contains all the classes from the latest catalog.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to