Ticket #1160: NagiosGen.patch
File NagiosGen.patch, 1.4 KB (added by https://www.google.com/accounts/o8/id?id=AItOawnQrJGA5cTPlSuMy-jZCtsSBGfqOtNfvzQ, 8 years ago) |
---|
-
NagiosGen.py
old new 49 49 raise Bcfg2.Server.Plugin.PluginExecutionError 50 50 host_groups = [grp for grp in metadata.groups 51 51 if os.path.isfile('%s/%s-group.cfg' % (self.data, grp))] 52 host_groups.append([bundle for bundlein metadata.bundles53 if os.path.isfile('%s/%s-bundle.cfg' % (self.data, bundle))])54 52 bundle_groups = [grp for grp in metadata.bundles 53 if os.path.isfile('%s/%s-bundle.cfg' % (self.data, grp))] 54 host_groups = bundle_groups + host_groups 55 55 host_config = ['define host {', 56 56 self.line_fmt % ('host_name', metadata.hostname), 57 57 self.line_fmt % ('alias', metadata.hostname), … … 87 87 def createserverconfig(self, entry, _): 88 88 """Build monolithic server configuration file.""" 89 89 host_configs = glob.glob(os.path.join(self.data, '*-host.cfg')) 90 group_configs = glob.glob(os.path.join(self.data, '*-group.cfg')) 90 group_configs = glob.glob(os.path.join(self.data, '*-group.cfg')) + glob.glob(os.path.join(self.data, '*-bundle.cfg')) 91 91 92 host_data = [] 92 93 group_data = [] 93 94 for host in host_configs: