Skip to content

Commit

Permalink
fix #559 Set default of all optional parameters in globals to undef
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed May 24, 2019
1 parent 091a69e commit d9afe72
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
2 changes: 0 additions & 2 deletions data/FreeBSD-kernel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ icinga2::globals::service_name: icinga2
icinga2::globals::service_reload: service icinga2 reload
icinga2::globals::user: icinga
icinga2::globals::group: icinga
icinga2::globals::ido_mysql_package_name: null
icinga2::globals::ido_mysql_schema: /usr/local/share/icinga2-ido-mysql/schema/mysql.sql
icinga2::globals::ido_pgsql_package_name: null
icinga2::globals::ido_pgsql_schema: /usr/local/share/icinga2-ido-pgsql/schema/pgsql.sql
icinga2::globals::icinga2_bin: /usr/local/sbin/icinga2
icinga2::globals::conf_dir: /usr/local/etc/icinga2
Expand Down
7 changes: 0 additions & 7 deletions data/OpenBSD-kernel.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
---


icinga2::globals::package_name: 'icinga2'
icinga2::globals::service_name: 'icinga2'
icinga2::globals::service_reload: 'rcctl restart icinga2'
icinga2::globals::user: '_icinga'
icinga2::globals::group: '_icinga'
icinga2::globals::ido_mysql_package_name: null
icinga2::globals::ido_mysql_schema: '/usr/local/share/icinga2-ido-mysql/schema/mysql.sql'
icinga2::globals::ido_pgsql_package_name: null
icinga2::globals::ido_pgsql_schema: '/usr/local/share/icinga2-ido-pgsql/schema/pgsql.sql'

icinga2::globals::icinga2_bin: '/usr/local/sbin/icinga2'

icinga2::globals::conf_dir: '/etc/icinga2'
icinga2::globals::lib_dir: '/usr/local/lib/icinga2'
icinga2::globals::log_dir: '/var/log/icinga2'
Expand All @@ -21,7 +15,6 @@ icinga2::globals::spool_dir: '/var/spool/icinga2'
icinga2::globals::cache_dir: '/var/cache/icinga2'
icinga2::globals::cert_dir: '/var/lib/icinga2/certs'
icinga2::globals::ca_dir: '/var/lib/icinga2/ca'

icinga2::globals::constants:
PluginDir: '/usr/local/libexec/nagios'
PluginContribDir: '/usr/local/share/icinga2/include/plugins-contrib.d'
5 changes: 0 additions & 5 deletions data/windows-kernel.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
icinga2::globals::package_name: icinga2
icinga2::globals::service_name: icinga2
icinga2::globals::service_reload: null
icinga2::globals::user: null
icinga2::globals::group: null
icinga2::globals::ido_mysql_package_name: null
icinga2::globals::ido_mysql_schema: C:/Program Files/icinga2/usr/share/icinga2-ido-mysql/schema/mysql.sql
icinga2::globals::ido_pgsql_package_name: null
icinga2::globals::ido_pgsql_schema: C:/Program Files/icinga2/usr/share/icinga2-ido-pgsql/schema/pgsql.sql
icinga2::globals::icinga2_bin: C:/Program Files/icinga2/sbin/icinga2.exe
icinga2::globals::conf_dir: C:/ProgramData/icinga2/etc/icinga2
Expand Down
10 changes: 5 additions & 5 deletions manifests/globals.pp
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,7 @@
class icinga2::globals(
String $package_name,
String $service_name,
Optional[String] $user,
Optional[String] $group,
Optional[String] $ido_mysql_package_name,
String $ido_mysql_schema,
Optional[String] $ido_pgsql_package_name,
String $ido_pgsql_schema,
Stdlib::Absolutepath $icinga2_bin,
Stdlib::Absolutepath $conf_dir,
Expand All @@ -98,7 +94,11 @@
Stdlib::Absolutepath $cert_dir,
Stdlib::Absolutepath $ca_dir,
Array[String] $reserved,
Optional[String] $service_reload,
Optional[String] $user = undef,
Optional[String] $group = undef,
Optional[String] $ido_mysql_package_name = undef,
Optional[String] $ido_pgsql_package_name = undef,
Optional[String] $service_reload = undef,
) {

assert_private()
Expand Down

0 comments on commit d9afe72

Please sign in to comment.