From 25b9b5f7cd2d64f464fb198d90cc757a1bff1c81 Mon Sep 17 00:00:00 2001 From: Matt Taggart Date: Tue, 22 Apr 2014 00:17:34 -0700 Subject: replace homedir with more specific keydir, authdir, and authfile in order to allow overriding each. modify ::agent, ::agent::config, and ::agent::generate_sshkey to allow changing at each level, with reasonable defaults --- manifests/agent/config.pp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'manifests/agent/config.pp') diff --git a/manifests/agent/config.pp b/manifests/agent/config.pp index 256af8f..40b9ff5 100644 --- a/manifests/agent/config.pp +++ b/manifests/agent/config.pp @@ -1,8 +1,10 @@ class check_mk::agent::config ( - $ip_whitelist = '', + $ip_whitelist = '', $port, $server_dir, - $homedir, + $keydir, + $authdir, + $authfile = undef, $use_cache, $user, $method = 'xinetd', @@ -34,8 +36,19 @@ class check_mk::agent::config ( } 'ssh' : { if $generate_sshkey { - check_mk::agent::generate_sshkey { 'check_mk_key': - homedir => $homedir + if $authfile { + # if authfile is overridden, pass it through + check_mk::agent::generate_sshkey { 'check_mk_key': + keydir => $keydir, + authdir => $authdir, + authfile => $authfile + } + } else { + # otherwise don't + check_mk::agent::generate_sshkey { 'check_mk_key': + keydir => $keydir, + authdir => $authdir + } } } } -- cgit v1.2.3