help-cfengine
[Top][All Lists]
Advanced

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

Re: building configuration files on server


From: Chip Seraphine
Subject: Re: building configuration files on server
Date: Tue, 20 Jul 2004 08:54:31 -0500
User-agent: KMail/1.5.4

On Tuesday 20 July 2004 04:22, Oyvind Gronnesby wrote:
> * John Wheeler
> |
> | I suppose you could use cfengine to generate cfengine *code*, but
> | I'm sure, like most people, you have collection of configs and data
> | tangled together that you would like to separate.
> 
> Indeed, yes.  We have most of the information we need in existing
> cfengine files, but need to build the configuration files for each
> host.

Before you go that perilous route, I would first try (hard) to see if it could 
be done in a more conventional manner using classes.  IMHO it would be 
easier, less error prone, and make for better documentation.

For instance, rather than build a cfengine config file set for your webserver, 
"foo", use classes:: within the master config to differentiate between 
webserver stuff and other stuff.

shellcommands:

        dns_servers.Hr00:: 
                "/etc/init.d/named restart"     #restart the DNS at midnight

        webservers.Hr00::
                "/etc/init.d/httpd restart"     #restart Apache at midnight

        foo.Hr01::
                "/some/special/command" #server foo needs special stuff done at 
1am

...etc.

> | I've seen some interesting solutions to this from other people on
> | the list, some use thing like m4, others just straight perl. I've
> | recently started to investigate xslt with an xml data model and had
> | some success.
> 
> Is there a collection of nice tricks for cfengine somewhere?  Or
> should I just google the list archives?

Most of the autogeneration of cfengine code that I have seen (and written and 
used) has more to do with authority and differentiation.  In other words, 
most people use it when cfengine is being used to read and enforce policy 
rather than maintain and set it.   

That being said, you could probably do well by picking through the archives 
for this list (or googling thru it).



-- 

Chip Seraphine
Unix Administrator
TradeLink, LLC
312-264-2048
chip@trdlnk.com





reply via email to

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