From 8b66047f8bf6c1c3c70e34d0145d4b5af5d139d0 Mon Sep 17 00:00:00 2001 From: Matt Taggart Date: Thu, 29 Sep 2016 13:09:22 -0700 Subject: make file a non-virtual resource this check_mk local plugin file resource doesn't need to be a virtual resource, I suspect the "@" was just a typo since it doesn't seem to be 'realize'd or used in any collectors. Also remove the tag since it's not used anywhere. --- manifests/agent/install_local.pp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'manifests/agent') diff --git a/manifests/agent/install_local.pp b/manifests/agent/install_local.pp index 7238440..6450abd 100644 --- a/manifests/agent/install_local.pp +++ b/manifests/agent/install_local.pp @@ -1,12 +1,11 @@ define check_mk::agent::install_local($source=undef, $content=undef, $ensure='present') { - @file { "/usr/lib/check_mk_agent/local/${name}" : + file { "/usr/lib/check_mk_agent/local/${name}" : ensure => $ensure, owner => 'root', group => 'root', mode => '0755', content => $content, source => $source, - tag => 'check_mk::local', require => Package['check-mk-agent'], } } -- cgit v1.2.3 From 7d6e6e57f1f12702a13c326bcae13406d424a509 Mon Sep 17 00:00:00 2001 From: Matt Taggart Date: Thu, 20 Jul 2017 13:01:26 -0700 Subject: create a check_mk::params and start using it --- manifests/agent/ps.pp | 7 +++++-- manifests/agent/register.pp | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'manifests/agent') diff --git a/manifests/agent/ps.pp b/manifests/agent/ps.pp index 67a999f..737cb91 100644 --- a/manifests/agent/ps.pp +++ b/manifests/agent/ps.pp @@ -1,12 +1,15 @@ define check_mk::agent::ps ( # procname and levels have defaults in check_mk::ps $procname = undef, - $levels = undef, + $levels = undef, # user is optional - $user = undef + $user = undef ) { + include check_mk::params + @@check_mk::ps { "${::fqdn}_${name}": + target => "${check_mk::params::etc_dir}/check_mk/conf.d/ps.mk", desc => $name, host => $::fqdn, procname => $procname, diff --git a/manifests/agent/register.pp b/manifests/agent/register.pp index 46cdeae..a609a45 100644 --- a/manifests/agent/register.pp +++ b/manifests/agent/register.pp @@ -1,8 +1,10 @@ class check_mk::agent::register ( $host_tags = '', - $hostname = $::fqdn -) { + $hostname = $::fqdn, + $etc_dir = $check_mk::params::etc_dir +) inherit check_mk::params { @@check_mk::host { $hostname: host_tags => $host_tags, + target => "${etc_dir}/check_mk/main.mk", } } -- cgit v1.2.3 From cac46e3649d5f190c2e8c3933c5f9af8065ebf1d Mon Sep 17 00:00:00 2001 From: Matt Taggart Date: Fri, 21 Jul 2017 11:45:15 -0700 Subject: fix syntax errors --- manifests/agent/register.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/agent') diff --git a/manifests/agent/register.pp b/manifests/agent/register.pp index a609a45..51c803d 100644 --- a/manifests/agent/register.pp +++ b/manifests/agent/register.pp @@ -2,7 +2,7 @@ class check_mk::agent::register ( $host_tags = '', $hostname = $::fqdn, $etc_dir = $check_mk::params::etc_dir -) inherit check_mk::params { +) inherits check_mk::params { @@check_mk::host { $hostname: host_tags => $host_tags, target => "${etc_dir}/check_mk/main.mk", -- cgit v1.2.3