Compare commits

..

No commits in common. "ortiche" and "master" have entirely different histories.

11 changed files with 24 additions and 42 deletions

View file

@ -25,9 +25,21 @@ class sshd::base {
case $::sshrsakey {
'': { info("no sshrsakey on ${::fqdn}") }
default: {
# only export sshkey when storedconfigs is enabled
if $::sshd::use_storedconfigs {
include ::sshd::sshkey
@@sshkey{$::fqdn:
ensure => present,
tag => 'fqdn',
type => ssh-rsa,
key => $::sshrsakey,
}
# In case the node has uses a shared network address,
# we don't define a sshkey resource using an IP address
if $sshd::shared_ip == 'no' {
@@sshkey{$sshd::sshkey_ipaddress:
ensure => present,
tag => 'ipaddress',
type => ssh-rsa,
key => $::sshrsakey,
}
}
}
}

View file

@ -28,16 +28,16 @@ class sshd(
$hostbased_authentication = 'no',
$permit_empty_passwords = 'no',
$authorized_keys_file = $::osfamily ? {
'Debian' => $::lsbmajdistrelease ? {
Debian => $::lsbmajdistrelease ? {
6 => '%h/.ssh/authorized_keys',
default => '%h/.ssh/authorized_keys %h/.ssh/authorized_keys2',
},
'RedHat' => $::operatingsystemmajrelease ? {
RedHat => $::operatingsystemmajrelease ? {
5 => '%h/.ssh/authorized_keys',
6 => '%h/.ssh/authorized_keys',
default => '%h/.ssh/authorized_keys %h/.ssh/authorized_keys2',
},
'OpenBSD' => '%h/.ssh/authorized_keys',
OpenBSD => '%h/.ssh/authorized_keys',
default => '%h/.ssh/authorized_keys %h/.ssh/authorized_keys2',
},
$hardened = 'no',
@ -50,10 +50,9 @@ class sshd(
$sshkey_ipaddress = $::ipaddress,
$manage_client = true,
$hostkey_type = versioncmp($::ssh_version, '6.5') ? {
/(1|0)/ => [ 'rsa', 'ed25519' ],
/(^1|0)/ => [ 'rsa', 'ed25519' ],
/-1/ => [ 'rsa', 'dsa' ]
},
$use_storedconfigs = true
}
) {
validate_bool($manage_shorewall)
@ -70,10 +69,10 @@ class sshd(
}
case $::operatingsystem {
'gentoo': { include sshd::gentoo }
'redhat','centos': { include sshd::redhat }
'openbsd': { include sshd::openbsd }
'debian','ubuntu': { include sshd::debian }
gentoo: { include sshd::gentoo }
redhat,centos: { include sshd::redhat }
openbsd: { include sshd::openbsd }
debian,ubuntu: { include sshd::debian }
default: { include sshd::base }
}

View file

@ -1,21 +0,0 @@
# deploys the
class sshd::sshkey {
@@sshkey{$::fqdn:
ensure => present,
tag => 'fqdn',
type => 'ssh-rsa',
key => $::sshrsakey,
}
# In case the node has uses a shared network address,
# we don't define a sshkey resource using an IP address
if $sshd::shared_ip == 'no' {
@@sshkey{$::sshd::sshkey_ipaddress:
ensure => present,
tag => 'ipaddress',
type => 'ssh-rsa',
key => $::sshrsakey,
}
}
}

View file

@ -1 +0,0 @@
Ubuntu.erb

View file

@ -1 +0,0 @@
Ubuntu.erb

View file

@ -1 +0,0 @@
Ubuntu.erb

View file

@ -1 +0,0 @@
Ubuntu.erb

View file

@ -1 +0,0 @@
Ubuntu.erb

View file

@ -1 +0,0 @@
Ubuntu.erb

View file

@ -1 +0,0 @@
Ubuntu.erb

View file

@ -1 +0,0 @@
Ubuntu.erb