Forum: Cfengine Help
Subject: Re: I'm exploiting usemodule. There has got to be a better way to 
define global classes?
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,18623,18651#msg-18651

Metabaron, do you setup the file cfclass.conf yourself?  If so how is that 
different than hard coding global classes in Cfengine's policy?  At some point 
everyone has to define some global classes.  Any method I can think if is going 
to involve some manual work to setup and maintain them.

Typically I create my global classes by hand.  I have not needed to do anything 
automatically at this time.  If I did have to I would use Seva's method.  Seva, 
IIRC, bases his global classes on what is found on the host but not what he has 
put there manually.  For instance a public web server must have the httpd or 
apache daemon file and perhaps be a member of a specific subnet.  I would not 
create a classes file to distribute to my hosts and have the agent read it 
later to determine classes.

In terms of resources, hand coding takes the least computer resources, but 
might take more human resources.  The latter method of automatic class 
determination is going to take more of the agent's time to do.  Either method 
is useful.  In a  complex environment both might be used.

Mike asked about defining global classes in normal agent bundles.  I would try 
to avoid this.  This type of policy would be more difficult to maintain.  Using 
the methods I described I know where to find all of my global class 
definitions.  Sprinkling them throughout the policy as Mike described might 
drive me mental trying to find and maintain them.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to