diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-13 09:44:51 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-13 09:44:51 -0400 |
commit | e2355c04d5b79866eb9ca26f1303cbf5fa36b757 (patch) | |
tree | bb4cf31ba03705632681550d22abf9527a907c0b /src/lib | |
parent | fa25b112ec93f96eee47e7522047bafe29d2e92f (diff) | |
download | bcfg2-e2355c04d5b79866eb9ca26f1303cbf5fa36b757.tar.gz bcfg2-e2355c04d5b79866eb9ca26f1303cbf5fa36b757.tar.bz2 bcfg2-e2355c04d5b79866eb9ca26f1303cbf5fa36b757.zip |
Properties: made automatch in bcfg2.conf a default, not absolute; cleaned up docs
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Properties.py | 11 |
1 files changed, 7 insertions, 4 deletions
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) |