help-cfengine
[Top][All Lists]
Advanced

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

Re: Use of editfile to support templated configuration files


From: Ted Zlatanov
Subject: Re: Use of editfile to support templated configuration files
Date: 15 Dec 2004 10:31:02 -0500
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

On 14 Dec 2004, wbmccarty@gmail.com wrote:

> Alternatively, I'd like to somehow be able to specify a hierarchy of
> host groups, and have cfengine choose the file at the lowest level for
> which a  version of the file exists. This would be pretty easily done
> using an external module. But, I'd prefer to avoid external modules for
> now and I don't see how to manage such a hierarchy concisely using
> cfengine scripts.

In addition to the templating that I mentioned in another message in
this thread, cfperl (http://lifelogs.com/cfperl) has this
functionality as well.  It can pick the correct version of a file from
a hierarchy (directories in the hierarchy are class names) and install
it.  The *deepest* match is preferred, because if you have a config
file for "linux" and another for "linux/redhat/exposed" you want to
pick the latter for a Redhat machine exposed to the outside.  I think
that's what you mean by "lowest level" in the hiearchy.

cfperl is an external program, but can coexist with cfengine cleanly
and share the group definitions.

Ted




reply via email to

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