diff options
author | mh <mh@immerda.ch> | 2009-12-10 23:15:07 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2009-12-10 23:15:07 +0100 |
commit | bdf7bd334ee6a6a07eb6cfab17dc9c7fc79ec1a8 (patch) | |
tree | dc1ec042b5609e9896570dcd32bd3d252cbf68f8 /manifests/base.pp | |
parent | 81063ee57bdbdc1e888755ed74af795dfbcac611 (diff) | |
parent | 6601c382962824e7467fb00ea5a84894a901b937 (diff) | |
download | puppet-sshd-bdf7bd334ee6a6a07eb6cfab17dc9c7fc79ec1a8.tar.gz puppet-sshd-bdf7bd334ee6a6a07eb6cfab17dc9c7fc79ec1a8.tar.bz2 |
merged with riseup module, various cleaning up
Diffstat (limited to 'manifests/base.pp')
-rw-r--r-- | manifests/base.pp | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/manifests/base.pp b/manifests/base.pp index b249974..2ac2385 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -1,31 +1,35 @@ class sshd::base { - file { 'sshd_config': - path => '/etc/ssh/sshd_config', - owner => root, - group => 0, - mode => 600, - content => $lsbdistcodename ? { - '' => template("sshd/sshd_config/${operatingsystem}.erb"), - default => template ("sshd/sshd_config/${operatingsystem}_${lsbdistcodename}.erb"), - }, - notify => Service[sshd], - } - # 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, - } - } - } - service{'sshd': - name => 'sshd', - enable => true, - ensure => running, - hasstatus => true, - require => File[sshd_config], + file { 'sshd_config': + path => '/etc/ssh/sshd_config', + content => $lsbdistcodename ? { + '' => template("sshd/sshd_config/${operatingsystem}.erb"), + default => template ("sshd/sshd_config/${operatingsystem}_${lsbdistcodename}.erb"), + }, + notify => Service[sshd], + owner => root, group => 0, mode => 600; + } + + # 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, + } + @@sshkey{"$ipaddress": + type => ssh-rsa, + key => $sshrsakey, + ensure => present, + } } + } + service{'sshd': + name => 'sshd', + enable => true, + ensure => running, + hasstatus => true, + require => File[sshd_config], + } } |