瀏覽代碼

Puppet 4.0.0 compatibility fixes

Tom De Vylder 9 年之前
父節點
當前提交
0ded568a44
共有 5 個文件被更改,包括 6 次插入27 次删除
  1. 4 7
      manifests/config.pp
  2. 1 1
      manifests/init.pp
  3. 1 7
      manifests/install.pp
  4. 0 6
      manifests/preinstall.pp
  5. 0 6
      manifests/preinstall/redhat.pp

+ 4 - 7
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,

+ 1 - 1
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)

+ 1 - 7
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,

+ 0 - 6
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': {

+ 0 - 6
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 {