help-cfengine
[Top][All Lists]
Advanced

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

Re: iterators in copy::


From: Frank Ranner
Subject: Re: iterators in copy::
Date: Sun, 01 Feb 2004 21:36:46 +1100
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

John Gray wrote:
iterators don't appear to work on the copy stanza? This sure would allow me to reduce the length of the stanza (I have a number of options of each file, so it gets rather long).

I was hoping to do something like:

files = ( /etc/hosts.allow:/etc/hosts.deny:/etc/inetd.conf:...)
$(mf)$(files)    dest=$(files)
        mode=644
        owner=root
        group=root
        type=checksum
        server=server.domain.com

then repeat this for another set of files with slightly different options.

Over quite a number of files, I only use about 5 different sets of options.

Did I just get the syntax wrong? Is there another way to apply a bunch options to a set of files without expanding them all out?

Thanks,

John

I think you can do
 $(mf)/etc    dest=/etc
         include=hosts.allow
         include=hosts.deny
         include=inedt.conf
         mode=644
         recurse=1
         owner=root
         group=root
         type=checksum
         server=server.domain.com

Using include automatically excludes everything else

Frank Ranner



reply via email to

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