Assert private classes

This commit is contained in:
Tom De Vylder 2015-03-06 10:00:33 +01:00
parent 4e1c7a6ef3
commit 0d54db18cc
4 changed files with 7 additions and 3 deletions

View file

@ -1,6 +1,8 @@
# == Class icingaweb2::config
#
class icingaweb2::config {
assert_private()
@user { 'icingaweb2':
ensure => present,
home => $::icingaweb2::web_root,

View file

@ -1,6 +1,8 @@
# == Class icingaweb2::install
#
class icingaweb2::install {
assert_private()
if $::icingaweb2::install_method == 'package' {
if $::icingaweb2::pkg_list {
package { $::icingaweb2::pkg_list:

View file

@ -1,6 +1,8 @@
# == Class icingaweb2::preinstall
#
class icingaweb2::preinstall {
assert_private()
if $::icingaweb2::manage_repo and $::icingaweb2::install_method == 'package' {
case $::operatingsystem {
'RedHat', 'CentOS': {

View file

@ -3,9 +3,7 @@
define icingaweb2::preinstall::redhat(
$pkg_repo_version,
) {
if $caller_module_name != $module_name {
fail 'Tried to include private class icingaweb2::preinstall::redhat'
}
assert_private()
case $::operatingsystem {
'RedHat', 'CentOS', 'Scientific': {