[Top][All Lists]

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

Re: Editfiles Considered Harmful

From: Ted Zlatanov
Subject: Re: Editfiles Considered Harmful
Date: Thu, 04 Dec 2003 10:34:21 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v)

On Thu, 4 Dec 2003, address@hidden wrote:

> However, the bottom line is predictability: how do you ensure that?
> If you can guarantee with high probability that a huge editfiles
> stanza is predictable - no problem.

I think it would be fascinating if cfengine could provide more
convergent editfiles functions.  DeleteLinesContaining and
AppendIfNoSuchLine are convergent, for instance.  Maybe the reference
should separate convergent functions and explain best usage.  They
work very well for /etc/hosts editing, for instance.

Considering the wide variety of configuration files, maybe this is
best handled by modules.  Nevertheless, it would be good if cfengine
had internal support for some convergent editing of configurations.
For instance, sshd_config and ssh_config for OpenSSH have a specific
format so it should be possible to say

 SetConfigStyle "sshd"
 SetConfigOption "PermitEmptyPasswords" "yes"

 SetConfigStyle "ssh"
 # auto-create the "Host *" line if it doesn't exist
 SetConfigOption "*" "ForwardAgent" "yes"

These are convergent functions implemented with a good understanding
of the configuration syntax, and have the additional benefit of being
easy to read.  They can be done with the current editfiles syntax,
but I wouldn't want to use something like that.


reply via email to

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