diff options
author | Matt Taggart <taggart@riseup.net> | 2014-05-13 10:27:34 -0700 |
---|---|---|
committer | Matt Taggart <taggart@riseup.net> | 2015-04-16 21:08:52 +0000 |
commit | bb832e0f0fa92627412058f690b45eec0b4bbadc (patch) | |
tree | cc7a8d9b2ced68359ef2161961fccd2d77f01ab3 /manifests/agent | |
parent | 133c87b0f3a85ccb4aafd16fef0fa68348a559c1 (diff) |
use new override_builtin parameter to fix problem with central authorized_keys directory, use sshuser
Diffstat (limited to 'manifests/agent')
-rw-r--r-- | manifests/agent/generate_sshkey.pp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/manifests/agent/generate_sshkey.pp b/manifests/agent/generate_sshkey.pp index f01d2cf..c72da91 100644 --- a/manifests/agent/generate_sshkey.pp +++ b/manifests/agent/generate_sshkey.pp @@ -33,12 +33,15 @@ define check_mk::agent::generate_sshkey ( # and restrict it to running only the agent if $authdir or $authfile { # if $authkey or $authdir are set, override authorized_keys path and file + # and also override using the built-in ssh_authorized_key since it may + # not be able to write to $authdir sshd::ssh_authorized_key { $ssh_key_name: - type => 'ssh-rsa', - key => $public_key, - user => 'root', - target => "${authdir}/${authfile}", - options => "command=\"${command}\""; + type => 'ssh-rsa', + key => $public_key, + user => $sshuser, + target => "${authdir}/${authfile}", + override_builtin => true, + options => "command=\"${command}\""; } } else { # otherwise use the defaults |