diff options
author | Micah Anderson <micah@riseup.net> | 2016-11-04 10:54:28 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2016-11-04 10:54:28 -0400 |
commit | 34a381efa8f6295080c843f86bfa07d4e41056af (patch) | |
tree | 9282cf5d4c876688602705a7fa0002bc4a810bde /puppet/modules/check_mk/manifests/agent.pp | |
parent | 0a72bc6fd292bf9367b314fcb0347c4d35042f16 (diff) | |
parent | 5821964ff7e16ca7aa9141bd09a77d355db492a9 (diff) |
Merge branch 'develop'
Diffstat (limited to 'puppet/modules/check_mk/manifests/agent.pp')
m--------- | puppet/modules/check_mk | 0 | ||||
-rw-r--r-- | puppet/modules/check_mk/manifests/agent.pp | 70 |
2 files changed, 70 insertions, 0 deletions
diff --git a/puppet/modules/check_mk b/puppet/modules/check_mk deleted file mode 160000 -Subproject aa02571537af90ac73309e6e216c9417802548c diff --git a/puppet/modules/check_mk/manifests/agent.pp b/puppet/modules/check_mk/manifests/agent.pp new file mode 100644 index 00000000..64109ae9 --- /dev/null +++ b/puppet/modules/check_mk/manifests/agent.pp @@ -0,0 +1,70 @@ +class check_mk::agent ( + $filestore = undef, + $host_tags = undef, + $ip_whitelist = undef, + $port = '6556', + $server_dir = '/usr/bin', + $keydir = '/omd/sites/monitoring', + $authdir = '/omd/sites/monitoring', + $authfile = undef, + $use_cache = false, + $user = 'root', + $version = undef, + $workspace = '/root/check_mk', + $agent_package_name = 'check_mk-agent', + $agent_logwatch_package_name = 'check_mk-agent-logwatch', + $method = 'xinetd', + $generate_sshkey = false, + $sshuser = undef, + $use_ssh_tag = 'ssh', + $hostname = $::fqdn, + $register_agent = true +) { + + case $method { + 'xinetd': { + $tags = $host_tags + include check_mk::agent::service + } + 'ssh': { + if ( $host_tags == undef ) or ( $host_tags == '' ) { + $tags = $use_ssh_tag + } else { + $tags = "${host_tags}|${use_ssh_tag}" + } + } + default: {} + } + + class { 'check_mk::agent::install': + version => $version, + filestore => $filestore, + workspace => $workspace, + agent_package_name => $agent_package_name, + agent_logwatch_package_name => $agent_logwatch_package_name, + method => $method + } + + class { 'check_mk::agent::config': + ip_whitelist => $ip_whitelist, + port => $port, + server_dir => $server_dir, + keydir => $keydir, + authdir => $authdir, + authfile => $authfile, + use_cache => $use_cache, + user => $user, + method => $method, + generate_sshkey => $generate_sshkey, + sshuser => $sshuser, + hostname => $hostname, + require => Class['check_mk::agent::install'], + } + + if ( $register_agent ) { + class { 'check_mk::agent::register': + host_tags => $tags, + hostname => $hostname, + } + } +} |