Compare commits

...

7 commits

Author SHA1 Message Date
1baecb9c4a Using quoted strings for release comparison 2016-08-16 15:26:03 +02:00
85b43a2379 Merge branch 'master' into ortiche 2016-08-16 15:24:07 +02:00
ng
672b0985d1 Merge branch 'support_missing_ubuntu_releases' into 'master'
[feat] [feat] Support missing ubuntu releases

Add quantal, raring, saucy, trusty, utopic, vivid, wily, xenial ubuntu release

See merge request !20
2015-11-21 11:52:12 +00:00
varac
e46479a618 [bug] Fix typo for including sshkey class 2015-11-09 17:09:30 +01:00
Micah
c2fd1a769e Merge branch 'disable_stored_config' into 'master'
[feat] Optinally disable exported resources

If run masterless, we cannot export resources, so
we move them to an own class. Including it can be
disabled by passing "use_storedconfig" to the sshd
class.

See merge request !21
2015-11-09 15:05:48 +00:00
varac
fe92ce01fa [feat] Optinally disable exported resources
If run masterless, we cannot export resources, so
we move them to an own class. Including it can be
disabled by passing "use_storedconfig" to the sshd
class.
2015-11-09 10:22:58 +01:00
varac
d5f7c33df5 [feat] [feat] Support missing ubuntu releases
Add quantal, raring, saucy, trusty, utopic, vivid, wily, xenial ubuntu release
2015-11-03 13:53:56 +01:00
11 changed files with 41 additions and 23 deletions

View file

@ -25,21 +25,9 @@ class sshd::base {
case $::sshrsakey {
'': { info("no sshrsakey on ${::fqdn}") }
default: {
@@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,
}
# only export sshkey when storedconfigs is enabled
if $::sshd::use_storedconfigs {
include ::sshd::sshkey
}
}
}

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',
@ -52,7 +52,8 @@ class sshd(
$hostkey_type = versioncmp($::ssh_version, '6.5') ? {
/(1|0)/ => [ 'rsa', 'ed25519' ],
/-1/ => [ 'rsa', 'dsa' ]
}
},
$use_storedconfigs = true
) {
validate_bool($manage_shorewall)
@ -69,10 +70,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 }
}

21
manifests/sshkey.pp Normal file
View file

@ -0,0 +1,21 @@
# 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

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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