[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overriding predefined variables?
From: |
Marlys Nelson |
Subject: |
Re: Overriding predefined variables? |
Date: |
Sun, 11 Nov 2001 10:10:23 -0600 |
Mark.Burgess@iu.hio.no wrote:
>
> Just quickly...
>
> First of all, class definitions are made in "classes" or "groups" section,
> not in "control".
Well, I do that. I have many classes defined in that section based on the
hostname. And that's somewhat my problem. Those definitions use the real
server name - because the same cfengine script will be used when the server is
being setup (not under it's real name) and when it's in production (using it's
real name).
What I was trying to define in the control section was my own version of the
special variables.
> > control:
> > host = ( "exec /bin/cat /some/where/the/real/hostname/is/stored" )
> > ipaddress = ( "192.168.1.1" )
Since the docs seem to warn not to do this because the special variables
aren't case sensitive, I thought I might get away with intentionally doing it
for my purposes.
> If you want to prevent cfengine from detecting the envionrment for testing
> purposes, use
>
> cfengine --no-hard-classes
>
> and set them manually, e.g. with -Dclassname or in groups/classes section.
I tried this but unfortunately --no-hard-classes removes too much. And, even
if I use -Dclassname to define the real hostname as a class, that doesn't help
where I use the variables $(host), $(ipaddress), etc.
--
Marlys A. Nelson Sr. Network Specialist
Information Technology Services Network Services
University of Wisconsin - River Falls 715/425-4357
410 South Third Street Email: Marlys.A.Nelson@uwrf.edu
River Falls WI 54022 http://www.uwrf.edu/