puppet 4 foo
[mirror/dsa-puppet.git] / modules / ssh / manifests / init.pp
index 4d40154..fc576f8 100644 (file)
@@ -1,8 +1,5 @@
 class ssh {
 
-       #nodes = hiera('nodes', nil, {'cluster' => hiera('cluster')})
-       #$rootkeys = nodes.collect{|x| hiera('rootkey', nil, {'hostname' => x})}
-
        package { [ 'openssh-client', 'openssh-server']:
                ensure => installed
        }
@@ -39,4 +36,18 @@ class ssh {
        file { '/etc/ssh/userkeys/root':
                content => template('ssh/authorized_keys.erb'),
        }
+
+       if ($::lsbmajdistrelease >= '8') {
+               if ! $has_etc_ssh_ssh_host_ed25519_key {
+                       exec { 'create-ed25519-host-key':
+                               command => 'ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -q -P "" -t ed25519',
+                       }
+               }
+
+               if $systemd {
+                       package { [ 'libpam-systemd' ]:
+                               ensure => installed
+                       }
+               }
+       }
 }