Forum: CFEngine Help
Subject: Re: Do a single DNS lookup
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,23813,23815#msg-23815

Yes, the logic could be encapsulated in a bundle that sets a single var which 
is used everywhere.  That's what I'm trying to do here. :)    Unfortunately, 
due to the three-pass nature, if I set the vars up as overrideable, the 
variable contents end up being the address of the wrong master when I use the 
var later.  What I need to do is have a way to capture the first value 
returned.  Unfortunately, the most straightforward means of identifying which 
location I'm running in is DNS.  I've been toying with the idea of including 
our network definition information in the Cfengine policy, but that's data 
duplication, and data duplication is typically a Bad Thing.

As far as fragility, I'd argue that this is more robust in the environment I'm 
describing.  If we need to move one of the secondaries to a new IP, move a 
machine name to a different location, etc, then the reconfiguration is handled 
in one place - DNS.

I actually wanted DNS to return only the address for the location-specific 
primary, but whatever software they use to manage CNAMEs dictated that they 
should do it this way.  Maybe I'll pressure them a little more to make sure 
that they can't just resolve the root problem of returning the wrong machines...

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to