help-cfengine
[Top][All Lists]
Advanced

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

Re: 2 Domains


From: Brendan Strejcek
Subject: Re: 2 Domains
Date: Tue, 16 Aug 2005 10:21:57 -0500
User-agent: Mutt/1.5.6+20040818i

Baker, Darryl wrote:

> My problem is that the machines have no other differences than a new
> domain. Same IP ranges, etc..

Then you need some other heuristic for cfagent to decide what domain a
machine is in. An IP range is just one example of such a heuristic. For
example, your OS install procedure could include touching a particular
file in /etc, which is tested for by FileExists. There are many other
ways you could differentiate those groups of machines.

Or you could do a grep on /etc/hostname (or whatever). If there is a
way that the host can figure out its domain, then there is a way that
cfagent can figure out the domain.

For example, on my debian boxes I could do:

    classes:
        cs_uchicago_edu = (
            ReturnsZero(/bin/sh -c '
                /bin/grep cs.uchicago.edu /etc/hostname >/dev/null 2>&1
            ')
        )

Best,
Brendan

--
Senior System Administrator
The University of Chicago
Department of Computer Science
http://www.cs.uchicago.edu/people/brendan




reply via email to

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