[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using variables in classes definition
From: |
paguerlais |
Subject: |
Using variables in classes definition |
Date: |
Mon, 10 Feb 2003 14:22:52 +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 enclose in quotes, it is considered as a command+
parameters which must be executed and whose result is used to defined
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 in the docs. Does somebody has any idea ?
Patrice
----------------
L'acces immediat aux meilleurs tarifs Air France et au billet electronique sur
http://www.airfrance.com
For immediate access to the best Air France fares and to electronic tickets,
visit our website http://www.airfrance.com
----------------
Les donnees et renseignements contenus dans ce message sont personnels,
confidentiels et secrets. Ce message est adresse a l'individu ou l'entite dont
les coordonnees figurent ci-dessus. Si vous n'etes pas le bon destinataire,
nous vous demandons de ne pas lire, copier, utiliser ou divulguer cette
communication. Nous vous prions de notifier cette erreur a l'expediteur et
d'effacer immediatement cette communication de votre systeme.
The information contained in this message is privileged, confidential, and
protected from disclosure. This message is intended for the individual or
entity adressed herein. If you are not the intended recipient, please do not
read, copy, use or disclose this communication to others; also please notify
the sender by replying to this message, and then delete it from your system.