Whitespace cleanup.

This commit is contained in:
Nick Chappell 2014-09-13 19:46:24 -07:00
parent b7c6046ec5
commit cc57f33ac1
28 changed files with 126 additions and 129 deletions

View file

@ -3,7 +3,7 @@
## Overview
This module installs and configures the [Icinga 2 monitoring system](https://www.icinga.org/icinga2/). It can also install and configure [NRPE](http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details) on client systems that are being monitored by an Icinga 2 server.
This module installs and configures the [Icinga 2 monitoring system](https://www.icinga.org/icinga2/). It can also install and configure [NRPE](http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details) on client systems that are being monitored by an Icinga 2 server.
The module has only been tested on [CentOS 6.5](http://www.centos.org/download/) and Ubuntu [12.04](http://releases.ubuntu.com/12.04/) and [14.04](http://releases.ubuntu.com/14.04/). Red Hat and other EL derivatives, like Fedora, should work, but have not been tested.
@ -46,7 +46,7 @@ For production use, you'll probably want to get the database password via a [Hie
To install Icinga 2, first set up a MySQL or Postgres database.
Once the database is set up, use the `icinga2::server` class with the database connection parameters to specify
Once the database is set up, use the `icinga2::server` class with the database connection parameters to specify
<pre>
#Install Icinga 2:
@ -66,7 +66,7 @@ When the `server_db_type` parameter is set, the right IDO database connection pa
<pre>
#Install Icinga 2:
class { 'icinga2::server':
class { 'icinga2::server':
server_db_type => 'pgsql',
db_host => 'localhost'
db_port => '5432'
@ -101,7 +101,7 @@ In a future version, the module will automatically create the IDO connection obj
<pre>
#Install Icinga 2:
class { 'icinga2::server':
class { 'icinga2::server':
...
server_install_nagios_plugins => false,
...
@ -186,11 +186,11 @@ Unlike the built-in Nagios types, the file owner, group and mode of the automati
####`undef` and default object values
Most of the object parameters *in the Puppet module* are set to **undef**.
Most of the object parameters *in the Puppet module* are set to **undef**.
This means that they will not be added to the rendered object definition files.
**However**, this doesn't mean that the values are undefined in Icinga 2. Icinga 2 itself has built-in default values for many object parameters and falls back to them if one isn't present in an object definition. See the docs for individual object types in [Configuring Icinga 2](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2) for more info about which object parameters have what default values.
**However**, this doesn't mean that the values are undefined in Icinga 2. Icinga 2 itself has built-in default values for many object parameters and falls back to them if one isn't present in an object definition. See the docs for individual object types in [Configuring Icinga 2](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2) for more info about which object parameters have what default values.
####`icinga2::object::host`

View file

@ -7,12 +7,12 @@
# Coming soon...
#
# === Examples
#
#
# Coming soon...
#
#
#Our base class.
class icinga2 {
}
}

View file

@ -25,4 +25,4 @@ class icinga2::nrpe (
class {'icinga2::nrpe::install':} ~>
class {'icinga2::nrpe::config':} ~>
class {'icinga2::nrpe::service':}
}
}

View file

@ -6,7 +6,7 @@
# * $command_name = What NRPE will know the command as; this defaults to the title of the resource
# * $nrpe_plugin_libdir = The directory where the NRPE plugins themselves live
# * $nrpe_plugin_name = The name of the plugin the command will run
# * $nrpe_plugin_args = The arguments to pass to the plugin. This may be optional,
# * $nrpe_plugin_args = The arguments to pass to the plugin. This may be optional,
# depending on the plugin and whether it expects any arguments or parameters
define icinga2::nrpe::command (

View file

@ -4,11 +4,11 @@
#
class icinga2::nrpe::config inherits icinga2::nrpe {
include icinga2::nrpe
#config resources here
#The NRPE configuration base directory:
file { $nrpe_config_basedir:
ensure => directory,
@ -17,7 +17,7 @@ class icinga2::nrpe::config inherits icinga2::nrpe {
mode => '755',
require => Package[$icinga2::params::icinga2_client_packages],
}
#The folder that will hold our command definition files:
file { '/etc/nagios/nrpe.d':
ensure => directory,

View file

@ -4,7 +4,7 @@
#
class icinga2::nrpe::install inherits icinga2::nrpe {
include icinga2::nrpe
#Apply our subclasses in the right order. Use the squiggly arrows (~>) to ensure that the
#class left is applied before the class on the right and that it also refreshes the
@ -18,7 +18,7 @@ class icinga2::nrpe::install inherits icinga2::nrpe {
#Package repositories
##################
class icinga2::nrpe::install::repos inherits icinga2::nrpe {
include icinga2::nrpe
#repository resources here
@ -47,4 +47,4 @@ class icinga2::nrpe::install::execs {
#exec resources here
}
}

View file

@ -32,6 +32,5 @@ define icinga2::nrpe::plugin (
require => Package[$icinga2::params::icinga2_client_packages],
notify => Service[$icinga2::params::nrpe_daemon_name]
}
}

View file

@ -1,6 +1,6 @@
# == Class: icinga2::params
#
# This class is intentionally empty. It just serves as a container class for other
# This class is intentionally empty. It just serves as a container class for other
# icinga2::object:: classes to make the module's file layout cleaner (all object defined types
# can be put into an objects/ subdirectory)
#
@ -10,4 +10,4 @@
# more details.
#
class icinga2::objects { }
class icinga2::objects { }

View file

@ -43,7 +43,7 @@ define icinga2::object::apply_service_to_host (
$target_file_group = 'root',
$target_file_mode = '644'
) {
#Do some validation of the class' parameters:
validate_string($object_servicename)
validate_string($template_to_import)
@ -65,4 +65,4 @@ define icinga2::object::apply_service_to_host (
notify => Service['icinga2'],
}
}
}

View file

@ -1,5 +1,5 @@
# == Defined type: icinga2::object::host
#
#
# This is a defined type for Icinga 2 host objects.
# See the following Icinga 2 doc page for more info:
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-host
@ -48,7 +48,7 @@ define icinga2::object::host (
validate_string($object_hostname)
validate_string($template_to_import)
validate_string($display_name)
validate_string($ipv4_address)
validate_string($ipv4_address)
validate_array($groups)
validate_hash($vars)
validate_string($target_dir)
@ -66,4 +66,4 @@ define icinga2::object::host (
notify => Service['icinga2'],
}
}
}

View file

@ -43,4 +43,4 @@ define icinga2::object::hostgroup (
notify => Service['icinga2'],
}
}
}

View file

@ -1,5 +1,5 @@
# == Defined type: icinga2::object::idomysqlconnection
#
#
# This is a defined type for Icinga 2 IDO MySQL connection objects.
# See the following Icinga 2 doc page for more info:
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-idomysqlconnection
@ -35,7 +35,6 @@ define icinga2::object::idomysqlconnection (
statehistory_age => 0,
servicechecks_age => 0,
systemcommands_age => 0
},
$categories = [],
$target_dir = '/etc/icinga2/conf.d',
@ -49,11 +48,11 @@ define icinga2::object::idomysqlconnection (
validate_string($object_name)
validate_string($template_to_import)
validate_string($host)
validate_string($user)
validate_string($password)
validate_string($database)
validate_string($user)
validate_string($password)
validate_string($database)
validate_string($table_prefix)
validate_string($instance_name)
validate_string($instance_name)
validate_hash($cleanup)
validate_array($categories)
validate_string($target_dir)
@ -71,4 +70,4 @@ define icinga2::object::idomysqlconnection (
notify => Service['icinga2'],
}
}
}

View file

@ -1,5 +1,5 @@
# == Defined type: icinga2::object::idopgsqlconnection
#
#
# This is a defined type for Icinga 2 IDO Postgres connection objects.
# See the following Icinga 2 doc page for more info:
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-idopgsqlconnection
@ -35,7 +35,6 @@ define icinga2::object::idopgsqlconnection (
statehistory_age => 0,
servicechecks_age => 0,
systemcommands_age => 0
},
$categories = [],
$target_dir = '/etc/icinga2/conf.d',
@ -49,11 +48,11 @@ define icinga2::object::idopgsqlconnection (
validate_string($object_name)
validate_string($template_to_import)
validate_string($host)
validate_string($user)
validate_string($password)
validate_string($database)
validate_string($user)
validate_string($password)
validate_string($database)
validate_string($table_prefix)
validate_string($instance_name)
validate_string($instance_name)
validate_hash($cleanup)
validate_array($categories)
validate_string($target_dir)
@ -71,4 +70,4 @@ define icinga2::object::idopgsqlconnection (
notify => Service['icinga2'],
}
}
}

View file

@ -47,7 +47,7 @@ define icinga2::object::service (
validate_string($object_servicename)
validate_string($template_to_import)
validate_string($display_name)
validate_string($host_name)
validate_string($host_name)
validate_array($groups)
validate_hash($vars)
validate_string($target_dir)

View file

@ -26,7 +26,7 @@ define icinga2::object::servicegroup (
#Do some validation of the class' parameters:
validate_string($object_servicegroup_name)
validate_string($template_to_import)
validate_string($display_name)
validate_string($display_name)
validate_array($groups)
validate_string($target_dir)
validate_string($target_file_name)
@ -43,4 +43,4 @@ define icinga2::object::servicegroup (
notify => Service['icinga2'],
}
}
}

View file

@ -1,5 +1,5 @@
# == Defined type: icinga2::object::user
#
#
# This is a defined type for Icinga 2 user objects.
# See the following Icinga 2 doc page for more info:
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-user
@ -30,7 +30,7 @@ define icinga2::object::user (
#Do some validation of the class' parameters:
validate_string($object_username)
validate_string($display_name)
validate_string($host_name)
validate_string($host_name)
validate_array($groups)
validate_hash($vars)
validate_array($types)
@ -50,4 +50,4 @@ define icinga2::object::user (
notify => Service['icinga2'],
}
}
}

View file

@ -42,4 +42,4 @@ define icinga2::object::usergroup (
notify => Service['icinga2'],
}
}
}

View file

@ -19,17 +19,17 @@ class icinga2::params {
# Icinga 2 common package parameters
case $::operatingsystem {
#CentOS systems:
'CentOS': {
'CentOS': {
#Pick the right package provider:
$package_provider = 'yum'
}
#Ubuntu systems:
}
#Ubuntu systems:
'Ubuntu': {
#Pick the right package provider:
$package_provider = 'apt'
}
#Fail if we're on any other OS:
default: { fail("${::operatingsystem} is not supported!") }
}
@ -63,8 +63,8 @@ class icinga2::params {
$icinga2_server_package = 'icinga2'
$icinga2_server_plugin_packages = ["nagios-plugins-nrpe", "nagios-plugins-all", "nagios-plugins-openmanage", "nagios-plugins-check-updates"]
}
#Ubuntu systems:
#Ubuntu systems:
'Ubuntu': {
case $::operatingsystemrelease {
#Ubuntu 12.04 doesn't have nagios-plugins-common or nagios-plugins-contrib packages available...
@ -83,7 +83,7 @@ class icinga2::params {
}
}
}
#Fail if we're on any other OS:
default: { fail("${::operatingsystem} is not supported!") }
}
@ -135,8 +135,8 @@ class icinga2::params {
$etc_icinga2_obejcts_sub_dir_group = 'icinga'
$etc_icinga2_obejcts_sub_dir_mode = '750'
}
#Ubuntu systems:
#Ubuntu systems:
'Ubuntu': {
case $::operatingsystemrelease {
@ -229,25 +229,25 @@ class icinga2::params {
}
}
#Fail if we're on any other OS:
default: { fail("${::operatingsystem} is not supported!") }
}
##################
# Icinga 2 server service settings
# Icinga 2 server service settings
case $::operatingsystem {
#Icinga 2 server daemon names for Red Had/CentOS systems:
'CentOS': {
$icinga2_server_service_name = 'icinga2'
}
#Icinga 2 server daemon names for Ubuntu systems:
'Ubuntu': {
$icinga2_server_service_name = 'icinga2'
}
#Fail if we're on any other OS:
default: { fail("${::operatingsystem} is not supported!") }
}
@ -255,9 +255,9 @@ class icinga2::params {
##############################
# Icinga 2 client parameters
##############################
##################
# Icinga 2 client settings
# Icinga 2 client settings
$nrpe_listen_port = '5666'
$nrpe_log_facility = 'daemon'
$nrpe_debug_level = '0'
@ -265,9 +265,9 @@ class icinga2::params {
$nrpe_command_timeout = '60'
#in seconds:
$nrpe_connection_timeout = '300'
#Note: because we use .join in the nrpe.cfg.erb template, this value *must* be an array
#Note: because we use .join in the nrpe.cfg.erb template, this value *must* be an array
$nrpe_allowed_hosts = ['127.0.0.1',]
case $::operatingsystem {
#File and template variable names for Red Had/CentOS systems:
'CentOS': {
@ -296,9 +296,9 @@ class icinga2::params {
'CentOS': {
#Pick the right list of client packages:
$icinga2_client_packages = ["nrpe", "nagios-plugins-nrpe", "nagios-plugins-all", "nagios-plugins-openmanage", "nagios-plugins-check-updates"]
}
#Ubuntu systems:
}
#Ubuntu systems:
'Ubuntu': {
case $::operatingsystemrelease {
#Ubuntu 12.04 doesn't have nagios-plugins-common or nagios-plugins-contrib packages available...
@ -315,7 +315,7 @@ class icinga2::params {
}
}
}
#Fail if we're on any other OS:
default: { fail("${::operatingsystem} is not supported!") }
}
@ -327,12 +327,12 @@ class icinga2::params {
'CentOS': {
$nrpe_daemon_name = 'nrpe'
}
#Daemon names for Ubuntu systems:
'Ubuntu': {
$nrpe_daemon_name = 'nagios-nrpe-server'
}
#Fail if we're on any other OS:
default: { fail("${::operatingsystem} is not supported!") }
}

View file

@ -23,7 +23,7 @@ class icinga2::server (
$icinga2_server_package = $icinga2::params::icinga2_server_package,
$server_install_nagios_plugins = $icinga2::params::server_install_nagios_plugins,
) inherits icinga2::params {
#Do some validation of parameters so we know we have the right data types:
validate_bool($manage_repos)
validate_string($server_db_type)

View file

@ -7,14 +7,14 @@
# Coming soon...
#
# === Examples
#
#
# Coming soon...
#
#
class icinga2::server::config inherits icinga2::server {
include icinga2::params
#Directory resource for /etc/icinga2/:
file { '/etc/icinga2/':
path => '/etc/icinga2/',
@ -61,7 +61,7 @@ class icinga2::server::config inherits icinga2::server {
group => $etc_icinga2_features_enabled_group,
mode => $etc_icinga2_features_enabled_mode,
}
#Directory resource for /etc/icinga2/pki/:
file { '/etc/icinga2/pki/':
path => '/etc/icinga2/pki/',
@ -91,7 +91,7 @@ class icinga2::server::config inherits icinga2::server {
#File and directory resources for the object directories that can be used to hold different
#types of configuration objects
#Directory resource for /etc/icinga2/objects/:
file { '/etc/icinga2/objects/':
path => '/etc/icinga2/objects/',
@ -372,7 +372,7 @@ class icinga2::server::config inherits icinga2::server {
}
#Directory resource for /etc/icinga2/objects/applys/
#The files in this folder will be objects like
#The files in this folder will be objects like
#'apply something blah to Host...'
#See the following link for more info:
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#apply
@ -403,4 +403,4 @@ class icinga2::server::config inherits icinga2::server {
mode => $etc_icinga2_obejcts_sub_dir_mode,
}
}
}

View file

@ -7,23 +7,23 @@
# Coming soon...
#
# === Examples
#
#
# Coming soon...
#
#
class icinga2::server::install inherits icinga2::server {
include icinga2::server
#Apply our classes in the right order. Use the squiggly arrows (~>) to ensure that the
#class left is applied before the class on the right and that it also refreshes the
#class on the right.
#
#Here, we're setting up the package repos first, then installing the packages:
class{'icinga2::server::install::repos':} ~>
class{'icinga2::server::install::packages':} ~>
class{'icinga2::server::install::execs':} ->
class{'icinga2::server::install::repos':} ~>
class{'icinga2::server::install::packages':} ~>
class{'icinga2::server::install::execs':} ->
Class['icinga2::server::install']
}
class icinga2::server::install::repos inherits icinga2::server {
@ -64,7 +64,7 @@ class icinga2::server::install::repos inherits icinga2::server {
class icinga2::server::install::packages inherits icinga2::server {
include icinga2::server
#Install the Icinga 2 package
package {$icinga2_server_package:
ensure => installed,
@ -142,7 +142,7 @@ class icinga2::server::install::execs inherits icinga2::server {
require => Exec['postgres_schema_load'],
}
}
default: { fail("${server_db_type} is not supported!") }
}
}

View file

@ -7,12 +7,12 @@
# Coming soon...
#
# === Examples
#
#
# Coming soon...
#
#
class icinga2::server::service inherits icinga2::server {
include icinga2::server
#Service resource for the Icinga 2 daemon:
@ -20,5 +20,5 @@ class icinga2::server::service inherits icinga2::server {
ensure => running,
subscribe => Class['icinga2::server::config'],
}
}
}

View file

@ -1,7 +1,7 @@
######################################################################################
# /etc/icinga2/icinga2.conf config file template. Based on the file included in
# the Icinga 2 apt and yum packages.
# Autogenerated by Puppet
# /etc/icinga2/icinga2.conf config file template. Based on the file included in
# the Icinga 2 apt and yum packages
# Autogenerated by Puppet
# (c) Nicholas Chappell, 2014
######################################################################################
@ -59,4 +59,4 @@ include_recursive "conf.d"
/**
* Include all .conf files in the objects/ directory too:
*/
include_recursive "objects"
include_recursive "objects"

View file

@ -1,7 +1,7 @@
######################################################################################
# etc/nagios/nrpe.cfg config file template. Based on the file included in
# the Icinga apt package.
# Autogenerated by Puppet
# etc/nagios/nrpe.cfg config file template. Based on the file included in
# the Icinga apt package
# Autogenerated by Puppet
# (c) Nicholas Chappell, 2014
######################################################################################
@ -14,9 +14,9 @@
###########################################
#############################################################################
# Sample NRPE Config File
# Sample NRPE Config File
# Written by: Ethan Galstad (nagios@nagios.org)
#
#
# Last Modified: 11-23-2007
#
# NOTES:
@ -60,9 +60,9 @@ server_port=<%= scope.lookupvar('icinga2::nrpe::nrpe_listen_port') %>
# NRPE USER
# This determines the effective user that the NRPE daemon should run as.
# This determines the effective user that the NRPE daemon should run as
# You can either supply a username or a UID.
#
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
nrpe_user=<%= scope.lookupvar('icinga2::nrpe::nrpe_user') %>
@ -70,9 +70,9 @@ nrpe_user=<%= scope.lookupvar('icinga2::nrpe::nrpe_user') %>
# NRPE GROUP
# This determines the effective group that the NRPE daemon should run as.
# This determines the effective group that the NRPE daemon should run as.
# You can either supply a group name or a GID.
#
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
nrpe_group=<%= scope.lookupvar('icinga2::nrpe::nrpe_group') %>
@ -80,9 +80,9 @@ nrpe_group=<%= scope.lookupvar('icinga2::nrpe::nrpe_group') %>
# ALLOWED HOST ADDRESSES
# This is an optional comma-delimited list of IP address or hostnames
# This is an optional comma-delimited list of IP address or hostnames
# that are allowed to talk to the NRPE daemon. Network addresses with a bit mask
# (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currently
# (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currently
# supported.
#
# Note: The daemon only does rudimentary checking of the client's IP
@ -93,16 +93,16 @@ nrpe_group=<%= scope.lookupvar('icinga2::nrpe::nrpe_group') %>
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
allowed_hosts=<%= scope.lookupvar('icinga2::nrpe::nrpe_allowed_hosts').join(',') %>
# COMMAND ARGUMENT PROCESSING
# This option determines whether or not the NRPE daemon will allow clients
# to specify arguments to commands that are executed. This option only works
# if the daemon was configured with the --enable-command-args configure script
# option.
# option.
#
# *** ENABLING THIS OPTION IS A SECURITY RISK! ***
# *** ENABLING THIS OPTION IS A SECURITY RISK! ***
# Read the SECURITY file for information on some of the security implications
# of enabling this variable.
#
@ -118,9 +118,9 @@ dont_blame_nrpe=0
# command line from the command definition.
#
# *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! ***
# Usage scenario:
# Usage scenario:
# Execute restricted commmands using sudo. For this to work, you need to add
# the nagios user to your /etc/sudoers. An example entry for alllowing
# the nagios user to your /etc/sudoers. An example entry for alllowing
# execution of the plugins from might be:
#
# nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/
@ -129,7 +129,7 @@ dont_blame_nrpe=0
# without asking for a password. If you do this, make sure you don't give
# random users write access to that directory or its contents!
# command_prefix=/usr/bin/sudo
# command_prefix=/usr/bin/sudo
@ -216,11 +216,11 @@ connection_timeout=<%= scope.lookupvar('icinga2::nrpe::nrpe_connection_timeout')
#command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
#command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
#command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
#command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
#command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
# The following examples allow user-supplied arguments and can
# only be used if the NRPE daemon was compiled with support for
# only be used if the NRPE daemon was compiled with support for
# command arguments *AND* the dont_blame_nrpe directive in this
# config file is set to '1'. This poses a potential security risk, so
# make sure you read the SECURITY file before doing this.
@ -235,7 +235,7 @@ connection_timeout=<%= scope.lookupvar('icinga2::nrpe::nrpe_connection_timeout')
# if you'd prefer, you can instead place directives here
#include=/etc/nagios/nrpe_local.cfg
#
#
# you can place your config snipplets into nrpe.d/
# only snipplets ending in .cfg will get included
include_dir=/etc/nagios/nrpe.d/
include_dir=/etc/nagios/nrpe.d/

View file

@ -13,7 +13,7 @@
object Host "<%= @object_hostname %>" {
<%#- If any of the @ parameters are undefined, don't print anything for them: -%>
<%- if @template_to_import -%>
<%#- Otherwise, include the parameter: -%>
<%#- Otherwise, include the parameter: -%>
import "<%= @template_to_import -%>"
<%- end -%>
<%- if @display_name -%>

View file

@ -13,7 +13,7 @@
object HostGroup "<%= @object_hostgroup_name %>" {
<%#- If any of the @ parameters are undefined, don't print anything for them: -%>
<%- if @template_to_import -%>
<%#- Otherwise, include the parameter: -%>
<%#- Otherwise, include the parameter: -%>
import "<%= @template_to_import -%>"
<%- end -%>
<%- if @display_name -%>
@ -28,4 +28,4 @@ object HostGroup "<%= @object_hostgroup_name %>" {
<%- if @ignore_where -%>
ignore where "<%= @ignore_where -%>"
<%- end -%>
}
}

View file

@ -13,7 +13,7 @@
object ServiceGroup "<%= @object_servicegroup_name %>" {
<%#- If any of the @ parameters are undefined, don't print anything for them: -%>
<%- if @template_to_import -%>
<%#- Otherwise, include the parameter: -%>
<%#- Otherwise, include the parameter: -%>
import "<%= @template_to_import -%>"
<%- end -%>
<%- if @display_name -%>
@ -28,4 +28,4 @@ object ServiceGroup "<%= @object_servicegroup_name %>" {
<%- if @ignore_where -%>
ignore where "<%= @ignore_where -%>"
<%- end -%>
}
}

View file

@ -13,7 +13,7 @@
object UserGroup "<%= @object_usergroup_name %>" {
<%#- If any of the @ parameters are undefined, don't print anything for them: -%>
<%- if @template_to_import -%>
<%#- Otherwise, include the parameter: -%>
<%#- Otherwise, include the parameter: -%>
import "<%= @template_to_import -%>"
<%- end -%>
<%- if @display_name -%>
@ -22,4 +22,4 @@ object UserGroup "<%= @object_usergroup_name %>" {
<%- if @groups.length != 0 -%>
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
<%- end -%>
}
}