[Top][All Lists]

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

Iteratrion in editfiles

From: Chip Seraphine
Subject: Iteratrion in editfiles
Date: Mon, 23 Jun 2003 13:23:26 -0500
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.2.1) Gecko/20030121

I am trying to use cfengine to distribute SSH keys and am attempting to
do as much as possible within cfengine (as opposed to modules or
shellouts).  Editfiles seems ideal, since I can use the AppendIfWhatever
stuff to add a key only when and where it is really needed.

The problem is getting the operation performed on an arbitrary list of
files (e.g. keys for various users).  An iterator would be perfect since
I can put the users in:a:list:like:this easily enough, but the iteration
doesn't seem to work in an editfiles path like this:

{ /home/$(user)/.ssh/whatever

Short of something extreme (such as using m4 to autogenerate a cfengine
file on the fly), how can I get editfiles to run on a list of files
determined only at runtime?  Any ideas would be appreciated.

reply via email to

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