From e2355c04d5b79866eb9ca26f1303cbf5fa36b757 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Thu, 13 Sep 2012 09:44:51 -0400 Subject: Properties: made automatch in bcfg2.conf a default, not absolute; cleaned up docs --- src/lib/Bcfg2/Server/Plugins/Properties.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/lib/Bcfg2/Server/Plugins/Properties.py') diff --git a/src/lib/Bcfg2/Server/Plugins/Properties.py b/src/lib/Bcfg2/Server/Plugins/Properties.py index 5b48a2b8f..1b925ce46 100644 --- a/src/lib/Bcfg2/Server/Plugins/Properties.py +++ b/src/lib/Bcfg2/Server/Plugins/Properties.py @@ -125,12 +125,15 @@ class Properties(Bcfg2.Server.Plugin.Plugin, SETUP = core.setup def get_additional_data(self, metadata): - automatch = self.core.setup.cfp.getboolean("properties", "automatch", - default=False) + if self.core.setup.cfp.getboolean("properties", "automatch", + default=False): + default_automatch = "true" + else: + default_automatch = "false" rv = dict() for fname, pfile in self.store.entries.items(): - if (automatch or - pfile.xdata.get("automatch", "false").lower() == "true"): + if pfile.xdata.get("automatch", + default_automatch).lower() == "true": rv[fname] = pfile.XMLMatch(metadata) else: rv[fname] = copy.copy(pfile) -- cgit v1.2.3-1-g7c22