Nigel,

Are you referring to the 'Class Filters' section on
http://docs.puppetlabs.com/mcollective/reference/integration/puppet.html ?

If so, that's not really the same thing. Classes.txt lists classes included
on a server. That's not what I am looking for. Life isn't always as simple
as assuming that all machines within a certain functional group include the
same class. You'd think so, but hey, I work for a startup, so not everything
is engineered that well.

All I want to be able to do is set a variable on a per node basis that
defines a functional grouping, ie a class of server, and query that with
mcollective. Should not be difficult to do.

Doug.

On Thu, Sep 1, 2011 at 5:37 PM, Douglas Garstang <[email protected]>wrote:

> Thanks Nigel, but there's no mention of classes.txt on that page.
>
>
> On Thu, Sep 1, 2011 at 5:16 PM, Nigel Kersten <[email protected]>wrote:
>
>>
>>
>> On Thu, Sep 1, 2011 at 5:02 PM, Douglas Garstang <[email protected]
>> > wrote:
>>
>>> On Thu, Sep 1, 2011 at 4:58 PM, Aaron Grewell 
>>> <[email protected]>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 <
>>>> [email protected]> wrote:
>>>>
>>>>> On Thu, Sep 1, 2011 at 4:56 PM, Aaron Grewell <[email protected]
>>>>> > 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 [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-users?hl=en.
>>
>
>
>
> --
> Regards,
>
> Douglas Garstang
> http://www.linkedin.com/in/garstang
> Email: [email protected]
> Cell: +1-805-340-5627
>
>


-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: [email protected]
Cell: +1-805-340-5627

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" 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-users?hl=en.

Reply via email to