help-cfengine
[Top][All Lists]
Advanced

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

RE: Variable for server argument in copy command?


From: Patrice GUERLAIS
Subject: RE: Variable for server argument in copy command?
Date: Fri, 10 Nov 2000 09:21:20 +0100

I'm not sure I really understand your concern, because I always use variables 
in the server option of copy commands :

<cut>
copy:
                ${dir_ref_BB}/demarrage/${version_bb}
                        dest=/etc/rc.d/init.d
                        server=${SERVER}
                        recurse=inf
                        owner=root
                        group=root
                        mode=755
                        action=fix
                        type=mtime
                        define=BB_maj_demarrage
                        ignore=RCS
                        exclude=*~
                        exclude=*.cfsaved
</cut>

and dir_ref_BB, version_BB and SERVER are previously defined, some of them get 
their value depending on the context (which host is
running, configuration options, ...). Something like :

<example>
classes:
        cl1 = ( host1 host2 ... )
        cl2 = ( host10 host20 ... )
        ...

control:
        cl1::
                SERVER = ( server1 )
        cl2::
                SERVER = ( server2 )
        ...

        # Define a default server
        !cl1.!cl2::
                SERVER = ( default_server )

        actioncommand = ( copy )

copy:
        # copy clause like the above
        ...
</example>

I'm running cfengine 1.6.0a7.

HIH
Patrice


> -----Message d'origine-----
> De : address@hidden [mailto:address@hidden
> la part de Andrews, Martin
> Envoyé : jeudi 9 novembre 2000 23:13
> À : 'address@hidden'
> Objet : RE: Variable for server argument in copy command?
>
>
> Geary,
>
> An alternate method I have used is to write an alias for the local cfd
> server into the /etc/hosts of each machine - cfengine should be able to do
> this for you even. Then use this alias in the "server=" option. You can put
> an entry in DNS for the alias point to the gold server to bootstrap things.
>
> Martin
>
> _______________________________________________
> Help-cfengine mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-cfengine




reply via email to

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