[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Overriding predefined variables?
From: |
Marlys Nelson |
Subject: |
Overriding predefined variables? |
Date: |
Sun, 11 Nov 2001 09:39:45 -0600 |
I'm trying to setup a server installation method whereby the server is
initially installed, configured and tested on a restricted area of our
network. Then, when everything seems ok, it's moved into production on a
different ip and hostname.
My problem is that when cfengine runs (I'm using v1.6.3), it defines various
classes and variables based on the current hostname and ipaddress. I'd like
to substitute the eventual real server hostname, fqdn and ipaddress. I tried
defining my own variables with the same name:
control:
host = ( "exec /bin/cat /some/where/the/real/hostname/is/stored" )
ipaddress = ( "192.168.1.1" )
But this didn't work.
Right now, I'm using the command line --define to set a class for the real
server hostname but that only gets me part of the way to where I want to be.
Is there anyway to override what cfengine determines is the hostname, fqdn,
ipaddress, etc?
Also, I tried writing a module that defined the real server hostname as a
class but this didn't seem to work unless I listed that name as a class when I
defined the module (ex. actionsequence = ( module:sethost.host1 ...)). Since
the number of hostnames that could be defined this way is large, and having to
edit this just to add another host is a hassle, I'm wondering if there's any
other way to do this.
I would guess it's somewhat common practice to setup servers in a
restricted/secure area. How do others handle this with cfengine to avoid
hostname, ipaddress conflicts?
--
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/
- Overriding predefined variables?,
Marlys Nelson <=