help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Understanding output, modifying output, importing groups


From: Ed Brown
Subject: Re: Understanding output, modifying output, importing groups
Date: Thu, 27 Jan 2005 16:20:52 -0700

To me, running cfagent as a shellcommand inside of cfagent seems
unnecessarily convoluted, but maybe there are reasons or advantages I
don't understand.  

Would this do what you need (making some guesses and assumptions, like
that you really meant servicea where you have service1, and that you do
have a 'groups:' or 'classes:' action heading in cf.groups):

 - move the 'control:' section to cfagent.conf (just seems like the
right thing to do)

 - drop 'shellcommands:' section

 - add this 'import:' section to cf.main
import:
        servicea::  cf.servicea
        serviceb::  cf.serviceb 


-Ed



On Thu, 2005-01-27 at 14:44, Brian E. Seppanen wrote:
> I'm trying to understand the output of cfengine a bit better.   I have 
> several hosts that run cfexecd on a 15 minute interval.
> 
> I'm running 2.1.10.   My cfagent consists of
> 
> 
> import:
> 
>         any::
>                 /var/cfengine/inputs/cf.groups
>                 /var/cfengine/inputs/cf.main
> 
> 
> My cf.groups is something
> 
>         service1 = ( hosta hostb hostc hostd )
>       service2 = ( hoste hostf hostg )
> 
> my cf.main consists of
> 
> control:
> 
> 
>         actionsequence  = ( copy shellcommands )
>         TrustKey        = ( true )
>         TrustKeysFrom   = ( master )
>         domain          = ( domaina )
>         Underscore_Classes = ( on )
>         sysadm          = ( admin@domaina )  
>         access          = ( root )
>         smtpserver      = ( smtp.domaina )
>         EmailFrom       = ( cfengine@domaina )
>         EmailMaxLines   = ( 10000 )
>         EditfileSize    = ( 800000 )
>         IfElapsed       = ( 2 )
>         ExpireAfter     = ( 2 )
>         SkipVerify      = ( true )
>         OutputPrefix    = ( "main=>" )
> 
> 
> copy:
> 
>         servicea::
> 
>                 /var/cfengine/services/servicea/cf.servicea
>                         dest=/var/cfengine/inputs/cf.servicea
>                         server=master
>                         trustkey=true
>                         encrypt=true
>                         force=true
> 
>       serviceb:: 
> 
>                 /var/cfengine/services/serviceb/cf.serviceb 
>                         dest=/var/cfengine/inputs/cf.serviceb 
>                         server=master               
>                         trustkey=true
>                         encrypt=true
>                         force=true
> 
> shellcommands:
> 
>         servicea::
> 
>                 "/var/cfengine/sbin/cfagent -i -f 
> /var/cfengine/inputs/cf.servicea"
> 
>         serviceb::
> 
>                 "/var/cfengine/sbin/cfagent -i -f 
> /var/cfengine/inputs/cf.serviceb
> 
> 
> So my undertanding of the scenario is that cfexecd calls cfagent which 
> uses cfagent.conf,  cfagent.conf does nothing more than import some groups 
> into play.   Those groups are evaluated and if the host belongs to one of 
> those groups it pulls a specific service cf.  
> 
> So I get the following output.   And I see the same action twice.   Once 
> listed under cfagent output denoted by main=> and once under os/linux.cf 
> denoted by linux+host->
> 
> cfengine::in/cfagent -i -: main=>:in/cfagent -i -:  
> linux+host->:newaliases: /etc/aliases: 154 aliases, longest 287 bytes,
> 8244 bytes total 
> main=>:in/cfagent -i -: linux+hostr->:newaliases:
> /etc/aliases: 154 aliases, longest 287 bytes, 8244 bytes total
> 
> Is there any way that I can either have all output listed under cfagent 
> and not listed under subcategories, or vice versa?   Or would I need to 
> restructure so that I'm using a single cfagent.conf?     
> 
> I like the method we have for maintaining seperate cf's under a seperate 
> hierarchy.    It could be that I'm just blind to an obvious solution.   
> Would anyone mind commenting?   How have others handled groups and 
> imports and the corresponding output.     
> 
> Thanks for the help.
> 
> 
> 
> Brian Seppanen
> seppy@chartermi.net
> 608.826.1464
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine




reply via email to

[Prev in Thread] Current Thread [Next in Thread]