help-cfengine
[Top][All Lists]
Advanced

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

help: How to use iteration over list variable ??


From: Guolin Cheng
Subject: help: How to use iteration over list variable ??
Date: Thu, 19 Feb 2004 18:25:41 -0800

Hi, all,

 I got a problem to use the inmature list variable in cfengine, any one has a 
alternate solution?  my cfagent.conf is something like the following:

  cfagent.conf

  ...
  control:
        
        listOfCronOwners = ( root:user1:user2:user3:...:user100 )

  ...

  copy:
        
   linux::

    $(master_cfconfigs)/crontabs/$(listOfCrontabOwners)/crontabs.$(host)
                        dest=/var/spool/cron/$(listOfCrontabOwners)
                        mode=0444
                        owner=$(listOfCrontabOwners)
                        group=wheel
                        server=$(policyhost)
        
 ...


 But the above fails, since it trys to copy file to 
/var/spool/cron/root:user1:user2:...:user100, and change owner to the long ugly 
name as well, while it DOES iterate over the list to check crontabs.<eachUser>.

 Suggestions are really appreciated. Otherwise I have to copy-paste the above 
standza 101 times. :(

 Thanks.        
 --Guolin Cheng





reply via email to

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