Thanks, exactly what I need, and if I had bothered RTFM before I asked, I
would have found ti in cf3 reference manual "Loops and lists in cfengine3" -
sorry about that. My cfengine setup just works, so I'm getting a bit rusty
each time I have to touch it...

Cheers,
Erlend


On 22 November 2010 08:36, Michael Potter <mega...@gmail.com> wrote:

> Is this what you are looking for?
>
> vars:
>
>   "users" slist => { "user0", "user1" ... };
>
> files:
>     svr01::
>        "/home/$(users)/.bashrc" ...
>
> On Mon, Nov 22, 2010 at 7:22 PM, Erlend Leganger
> <erlend.legan...@gmail.com> wrote:
> > What is best way to loop over a number of directories and update the same
> > file in each directory? I am looking into letting cfengine control bash
> > config files for many users. I could for example do this:
> > ...
> > files:
> >    svr01::
> >       "/home/user0/.bashrc"
> >          copy_from,...
> >       "/home/user1/.bashrc"
> >          copy_from,...
> >       "/home/user1/.bashrc"
> >          copy_from,...
> > ...
> > but there is probably a more elegant way to do this than to duplicate the
> > code per user home directory.
> > Cheers,
> > Erlend
> > _______________________________________________
> > Help-cfengine mailing list
> > Help-cfengine@cfengine.org
> > https://cfengine.org/mailman/listinfo/help-cfengine
> >
> >
>
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to