diff options
author | mh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279> | 2008-07-17 18:17:52 +0000 |
---|---|---|
committer | mh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279> | 2008-07-17 18:17:52 +0000 |
commit | 9fc6a0baf38651d2e1673e6deb47153fe9348b75 (patch) | |
tree | 99f307de500553dda8a80cacee65a08beea50f48 /manifests/init.pp | |
parent | 8f006bb6a08fc95da6fa424f2c1dc746789426c5 (diff) | |
download | puppet-sshd-9fc6a0baf38651d2e1673e6deb47153fe9348b75.tar.gz puppet-sshd-9fc6a0baf38651d2e1673e6deb47153fe9348b75.tar.bz2 |
added exporting and collecting of ssh keys
Taken from David Schmitts ssh module: http://git.black.co.at/?p=module-ssh
git-svn-id: https://svn/ipuppet/trunk/modules/sshd@1877 d66ca3ae-40d7-4aa7-90d4-87d79ca94279
Diffstat (limited to 'manifests/init.pp')
-rw-r--r-- | manifests/init.pp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index aa0ebfc..3b20efb 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -14,7 +14,7 @@ # Deploy authorized_keys file with the define # sshd::deploy_auth_key # -# shdd-config: +# sshd-config: # # The configuration of the sshd is rather strict and # might not fit all needs. However there are a bunch @@ -45,6 +45,8 @@ # class sshd { + include sshd::client + case $operatingsystem { gentoo: { include sshd::gentoo } redhat: { include sshd::redhat } @@ -94,7 +96,19 @@ class sshd::base { ensure => running, hasstatus => true, require => File[sshd_config], - } + } + # Now add the key, if we've got one + case $sshrsakey_key { + '': { info("no sshrsakey on $fqdn") } + default: { + @@sshkey{"$hostname.$domain": + type => ssh-rsa, + key => $sshrsakey_key, + ensure => present, + require => Package["openssh-client"], + } + } + } } class sshd::linux inherits sshd::base { |