diff options
Diffstat (limited to 'manifests/agent.pp')
-rw-r--r-- | manifests/agent.pp | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/manifests/agent.pp b/manifests/agent.pp index 2ff9da5..505db64 100644 --- a/manifests/agent.pp +++ b/manifests/agent.pp @@ -4,7 +4,9 @@ class check_mk::agent ( $ip_whitelist = undef, $port = '6556', $server_dir = '/usr/bin', - $homedir = '/omd/sites/monitoring', + $keydir = '/omd/sites/monitoring', + $authdir = '/omd/sites/monitoring', + $authfile = undef, $use_cache = false, $user = 'root', $version = undef, @@ -40,16 +42,36 @@ class check_mk::agent ( 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, - homedir => $homedir, - use_cache => $use_cache, - user => $user, - method => $method, - generate_sshkey => $generate_sshkey, - require => Class['check_mk::agent::install'], + + if $authfile { + # if authfile is set, pass it though + 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, + require => Class['check_mk::agent::install'], + } + } else { + # otherwise don't + class { 'check_mk::agent::config': + ip_whitelist => $ip_whitelist, + port => $port, + server_dir => $server_dir, + keydir => $keydir, + authdir => $authdir, + use_cache => $use_cache, + user => $user, + method => $method, + generate_sshkey => $generate_sshkey, + require => Class['check_mk::agent::install'], + } } if ( $register_agent ) { |