diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/NagiosGen.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/NagiosGen.py b/src/lib/Bcfg2/Server/Plugins/NagiosGen.py index 045e46350..9d3b3488b 100644 --- a/src/lib/Bcfg2/Server/Plugins/NagiosGen.py +++ b/src/lib/Bcfg2/Server/Plugins/NagiosGen.py @@ -46,6 +46,11 @@ class NagiosGen(Plugin, Generator): metadata.hostname) host_groups = [grp for grp in metadata.groups if os.path.isfile('%s/%s-group.cfg' % (self.data, grp))] + if os.path.isfile('%s/%s-group.cfg' % + (self.data, grp))] + \ + [bundle for bundle in metadata.bundles + if os.path.isfile('%s/%s-bundle.cfg' % + (self.data, bundle))] host_config = ['define host {', self.line_fmt % ('host_name', metadata.hostname), self.line_fmt % ('alias', metadata.hostname), @@ -81,7 +86,8 @@ class NagiosGen(Plugin, Generator): def createserverconfig(self, entry, _): """Build monolithic server configuration file.""" host_configs = glob.glob(os.path.join(self.data, '*-host.cfg')) - group_configs = glob.glob(os.path.join(self.data, '*-group.cfg')) + group_configs = glob.glob(os.path.join(self.data, '*-group.cfg')) + \ + glob.glob(os.path.join(self.data, '*-bundle.cfg')) host_data = [] group_data = [] for host in host_configs: |