help-cfengine
[Top][All Lists]
Advanced

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

singlecopy: dynamic iteration ?


From: Yves
Subject: singlecopy: dynamic iteration ?
Date: Wed, 9 Feb 2005 16:28:36 +0900

Starting point:
Iteration in the 'from' field of a copy action works fine !
See following example. ( I reduced the code )

-----------------------------------------------------
control:
        singlecopy     =  ( on )
        mygroups      =  ( "groupname1:groupname2" )

copy:

     /cfdepot/group/$(mygroups)/root/
                dest=/
                r=inf
                type=sum
                server=cfmaster

     /cfdepot/arch/$(class)/$(os)/root/
                dest=/
                r=inf
                type=sum
                server=cfmaster

      /cfdepot/common/root/
                dest=/
                r=inf
                type=sum
                server=cfmaster
---------------------------------------------------------

There is the following filetree structure on my cfengine master:
/cfdepot/group/groupname1/root/...
                        groupname2/root/...
                        groupname3/root/...
                        ...
                        groupname99/root/...

Now I want to set the iteration list dynamic depending on the group folders 
(groupname1-n) and the defined classes during cfagent run.
i.e. If there is a defined class and there is also a folder with the same name 
in the cfdepot than add this name to the iteration list.

Defined Classes = ( 005effed4c00 10_63_40  compiled_on_aix5_1_0_0 ........ 
groupname1 groupname3 groupname99 )
--> iteration list = "groupname1:groupname3:groupname99"

Okay, I thought this is a good chance to use for the first time the cfengine 
action "module" or rather "methods".
The mission was not successful.

I can post my "methods/module" scenario (perl skript), but first of all I want 
to ask, if there is another solution.
Maybe I can't see the wood for the trees !

Regards Yves

 address@hidden am 09.02.2005 14:41:22 Uhr





reply via email to

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