From 3a7255165db31a8f86dc839e8b9bdea0cf0743ac Mon Sep 17 00:00:00 2001 From: Lennart Betz Date: Wed, 7 Sep 2016 21:43:20 +0000 Subject: [PATCH] fix Bug #12656 --- manifests/config.pp | 2 +- manifests/install.pp | 4 +++- manifests/service.pp | 10 ++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index da999aa70..aa557888e 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -14,7 +14,7 @@ # # Icinga Development Team # -class icinga2::config inherits icinga2::params { +class icinga2::config { if $module_name != $caller_module_name { fail("icinga2::config is a private class of the module icinga2, you're not permitted to use it.") diff --git a/manifests/install.pp b/manifests/install.pp index 2cde136a3..64d5232ef 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -15,7 +15,7 @@ # # Icinga Development Team # -class icinga2::install inherits icinga2::params { +class icinga2::install { if $module_name != $caller_module_name { fail("icinga2::install is a private class of the module icinga2, you're not permitted to use it.") @@ -23,6 +23,8 @@ if $::osfamily == 'windows' { Package { provider => chocolatey, } } + $package = $icinga2::params::package + package { $package: ensure => installed, } diff --git a/manifests/service.pp b/manifests/service.pp index 03b8288f3..530b8fd5d 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -17,16 +17,18 @@ # # Icinga Development Team # -class icinga2::service inherits icinga2::params { +class icinga2::service { if $module_name != $caller_module_name { fail("icinga2::service is a private class of the module icinga2, you're not permitted to use it.") } - $ensure = $icinga2::ensure - $enable = $icinga2::enable + $ensure = $icinga2::ensure + $enable = $icinga2::enable + $manage_service = $icinga2::manage_service + $service = $icinga2::params::service - if $icinga2::manage_service { + if $manage_service { service { $service: ensure => $ensure, enable => $enable,