help-cfengine
[Top][All Lists]
Advanced

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

classes / variable overriding etc.. / (master serves more than one domai


From: Jan Y. Brueckner
Subject: classes / variable overriding etc.. / (master serves more than one domain) / Q for Mark?
Date: Sun, 31 Oct 2004 14:30:05 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello everyone!

I now use cfengine for quite a while being largely happy with it. Now
operating a configuration master that is part of more than one domain,
serving all of them with configuration information (that are much alike)
the following questions have come to my mind:

1. What are your suggestions for designing such configurations in a
clean way?

2. Having 2 seperate things to do one would usually do this: (domain
example)

.
.
.
control:
~  class1::
~    domain = ( foo.bar )
~    variable = ( value1 )

~  class2::
~    domain = ( foobity.bar )
~    variable = ( value2 )

.
.
.

This clearly separates the two cases as does

.
.
.
control:
~   specialclass::             #specialhosts
~     specialvar = ( value1 )
~   !specialclass::            #everything else
~     specialvar = ( value2 )
.
.
.

This again is a clean logical separation.
However in my configuration much is alike and I only want certain
defaults to be overridden (think of an object oriented programming
language). So it reads like this:

control:
~    # (any::)
~    domain = ( foo.bar )
~    variable = ( value1 )
~    #more defenitions that dont change
~    .
~    .
~    .

~  special::
~    # only reset these variables
~    domain = ( foobity.bar )
~    variable = ( value2 )

~  evenmorespecial::
~    domain = ( foobity.foobity.bar )
~    variable = ( value3 )
~    variable55 = ( othervalue )

So since special and evenmorespecial hosts are also part of the any::
class there is no clear logical separation. Which value is taken?
If I write things down in this order it WORKS for me and the variables
are reset properly by the parser. But:

- -is this behaviour independent of the order it is written down? In other
words is any:: allways weaker than other (special) classes?

- -can this behaviour be guaranteed for upcomming versions?

- -is it more save to clearly separate such differing variables like:

control:
~  any::
~    common variables = ....
~  special::
~    differing variables = ...
~  special2::
~    differing variables = ...
~  !special.!specal2::
~    differing variables = ...




Thanks in advance,

Ian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org

iD8DBQFBhOjbAkBRz9mJJTERAlOaAJ99nbjLcGRXDU0yYhGWzniQXeU9dgCghe9O
l4oxz5ez5aH0CtC0xnnXAzU=
=NMic
-----END PGP SIGNATURE-----



reply via email to

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