From aaf55c9ebfa0e34f63b2ca3c2b660e1d164026dd Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 6 May 2013 18:13:12 +0200 Subject: lintify --- manifests/plugin/deploy.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin/deploy.pp') diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp index cbf64fb..c514eed 100644 --- a/manifests/plugin/deploy.pp +++ b/manifests/plugin/deploy.pp @@ -23,7 +23,7 @@ define munin::plugin::deploy( mode => '0755'; } - if ($::selinux == 'true') and (($::operatingsystem != 'CentOS') or ($::operatingsystem == 'CentOS' and $::lsbmajdistrelease != '5')){ + if (str2bool($::selinux) == true) and (($::operatingsystem != 'CentOS') or ($::operatingsystem == 'CentOS' and $::lsbmajdistrelease != '5')){ File["munin_plugin_${name}"]{ seltype => $seltype, } -- cgit v1.2.3 From 47c5d323099b341a785b44f9d05ff0b535ce12e6 Mon Sep 17 00:00:00 2001 From: Marco Nenciarini Date: Fri, 14 Feb 2014 16:08:40 +0100 Subject: Allow to deploy a plugin without registering it --- manifests/plugin/deploy.pp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'manifests/plugin/deploy.pp') diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp index c514eed..2cee966 100644 --- a/manifests/plugin/deploy.pp +++ b/manifests/plugin/deploy.pp @@ -3,7 +3,8 @@ define munin::plugin::deploy( $ensure = 'present', $source = '', $config = '', - $seltype = 'munin_exec_t' + $seltype = 'munin_exec_t', + $register = true, ) { $plugin_src = $ensure ? { 'present' => $name, @@ -36,9 +37,12 @@ define munin::plugin::deploy( File["munin_plugin_${name}"]{ require => $basic_require, } - # register the plugin - munin::plugin{$name: - ensure => $ensure, - config => $config + + # register the plugin if required + if ($register) { + munin::plugin{$name: + ensure => $ensure, + config => $config + } } } -- cgit v1.2.3 From bab6dff342ef3288f647edf3bc59580a1fdcc8c4 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 19 Apr 2014 14:04:32 +0200 Subject: the default selinux type should be unconfined --- manifests/plugin/deploy.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/plugin/deploy.pp') diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp index 2cee966..6a8d052 100644 --- a/manifests/plugin/deploy.pp +++ b/manifests/plugin/deploy.pp @@ -3,7 +3,7 @@ define munin::plugin::deploy( $ensure = 'present', $source = '', $config = '', - $seltype = 'munin_exec_t', + $seltype = 'munin_unconfined_exec_t', $register = true, ) { $plugin_src = $ensure ? { @@ -24,7 +24,7 @@ define munin::plugin::deploy( mode => '0755'; } - if (str2bool($::selinux) == true) and (($::operatingsystem != 'CentOS') or ($::operatingsystem == 'CentOS' and $::lsbmajdistrelease != '5')){ + if (str2bool($::selinux) == true) and (($::operatingsystem != 'CentOS') or ($::operatingsystem == 'CentOS' and $::lsbmajdistrelease > '5')){ File["munin_plugin_${name}"]{ seltype => $seltype, } -- cgit v1.2.3 From 0bbf3ce96c049cdcbc59dfdcef860f09d515f618 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 19 Apr 2014 17:11:58 +0200 Subject: correct seltype --- manifests/plugin/deploy.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin/deploy.pp') diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp index 6a8d052..461a218 100644 --- a/manifests/plugin/deploy.pp +++ b/manifests/plugin/deploy.pp @@ -3,7 +3,7 @@ define munin::plugin::deploy( $ensure = 'present', $source = '', $config = '', - $seltype = 'munin_unconfined_exec_t', + $seltype = 'munin_unconfined_plugin_exec_t', $register = true, ) { $plugin_src = $ensure ? { -- cgit v1.2.3 From 39eb7ac31ad7f1fc16c37c42823fb1860c1f09ba Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 9 Jul 2014 23:12:27 +0200 Subject: get rid off lsb facts - who runs sarge? --- manifests/plugin/deploy.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/plugin/deploy.pp') diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp index 461a218..2ffd92e 100644 --- a/manifests/plugin/deploy.pp +++ b/manifests/plugin/deploy.pp @@ -24,7 +24,7 @@ define munin::plugin::deploy( mode => '0755'; } - if (str2bool($::selinux) == true) and (($::operatingsystem != 'CentOS') or ($::operatingsystem == 'CentOS' and $::lsbmajdistrelease > '5')){ + if (str2bool($::selinux) == true) and (($::operatingsystem != 'CentOS') or ($::operatingsystem == 'CentOS' and $::operatingsystemmajrelease > '5')){ File["munin_plugin_${name}"]{ seltype => $seltype, } -- cgit v1.2.3