diff --git a/manifests/config.pp b/manifests/config.pp index 63a789d..a28ef5d 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,12 +1,9 @@ # == Class icingaweb2::config # -class icingaweb2::config { - if is_function_available('assert_private') { - assert_private() - } else { - private() - } - +class icingaweb2::config ( + $config_dir = $::icingaweb2::config_dir, + $web_root = $::icingaweb2::web_root, +) { @user { 'icingaweb2': ensure => present, home => $::icingaweb2::web_root, diff --git a/manifests/init.pp b/manifests/init.pp index 92117de..416c65f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -220,7 +220,7 @@ class icingaweb2 ( class { 'icingaweb2::preinstall': } -> class { 'icingaweb2::install': } -> class { 'icingaweb2::config': } -> - Class [ 'icingaweb2' ] + Class['icingaweb2'] validate_absolute_path($config_dir) validate_absolute_path($web_root) diff --git a/manifests/install.pp b/manifests/install.pp index 7ca245e..5d4f55f 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -1,12 +1,6 @@ # == Class icingaweb2::install # class icingaweb2::install { - if is_function_available('assert_private') { - assert_private() - } else { - private() - } - if $::icingaweb2::install_method == 'package' { if $::icingaweb2::pkg_list { package { $::icingaweb2::pkg_list: @@ -29,7 +23,7 @@ class icingaweb2::install { before => Vcsrepo['icingaweb2'], } } - + vcsrepo { 'icingaweb2': ensure => present, path => $::icingaweb2::web_root, diff --git a/manifests/preinstall.pp b/manifests/preinstall.pp index 1cdcf7d..04e36b9 100644 --- a/manifests/preinstall.pp +++ b/manifests/preinstall.pp @@ -1,12 +1,6 @@ # == Class icingaweb2::preinstall # class icingaweb2::preinstall { - if is_function_available('assert_private') { - assert_private() - } else { - private() - } - if $::icingaweb2::manage_repo and $::icingaweb2::install_method == 'package' { case $::operatingsystem { 'RedHat', 'CentOS': { diff --git a/manifests/preinstall/redhat.pp b/manifests/preinstall/redhat.pp index 25ea873..6e97065 100644 --- a/manifests/preinstall/redhat.pp +++ b/manifests/preinstall/redhat.pp @@ -3,12 +3,6 @@ define icingaweb2::preinstall::redhat( $pkg_repo_version, ) { - if is_function_available('assert_private') { - assert_private() - } else { - private() - } - case $::operatingsystem { 'RedHat', 'CentOS', 'Scientific': { case $pkg_repo_version {