diff options
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Properties.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Properties.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Properties.py b/src/lib/Bcfg2/Server/Plugins/Properties.py index 33c9e1909..8d3e049d4 100644 --- a/src/lib/Bcfg2/Server/Plugins/Properties.py +++ b/src/lib/Bcfg2/Server/Plugins/Properties.py @@ -128,5 +128,13 @@ class Properties(Bcfg2.Server.Plugin.Plugin, SETUP = core.setup - def get_additional_data(self, _): - return copy.copy(self.store.entries) + def get_additional_data(self, metadata): + autowatch = self.core.setup.cfp.getboolean("properties", "automatch") + rv = dict() + for fname, pfile in self.store.entries.items(): + if autowatch or pfile.xdata.get("automatch", + "false").lower() == "true": + rv[fname] = pfile.XMLMatch(metadata) + else: + rv[fname] = copy.copy(pfile) + return rv |