[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using variables in classes definition
From: |
address@hidden |
Subject: |
Using variables in classes definition |
Date: |
Mon, 10 Feb 2003 12:50:18 +0100 |
I need to define a variable and a class depending on that variable. Something
like :
<example>
control:
servers = ( host1 host2 )
classes:
i_am_a_server = ( ${servers} )
</example>
It doesn't work because :
- ${servers} must be enclosed in quotes for syntax needs
- if ${servers} is enclosed in quotes, it is considered as a command+parameters
which must be executed and whose result is used to define i_am_a_server.
I need both the variable and the class because somewhere later in my script I
give the variable value as a parameter to an external script (shellcommands),
and some sections of the script are activated only if the running host belongs
to the list "servers".
Of course I can repeat the hosts list on the "i_am_a_server" class definition,
but each time I modify "servers" I must then think to modify also
"i_am_a_server" :-(
I couldn't find something to do that in the docs. Does somebody has any idea ?
Patrice
-------------
SPECIAL ADSL
L'ADSL à partir de 15,95 EUR/mois et le modem ADSL offert ? C'est en
exclusivité chez Tiscali !
Pour profiter de cette offre, cliquez ici: http://register.tiscali.fr/adsl/
Offre soumise à conditions.
- Using variables in classes definition,
address@hidden <=