]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/ssh/manifests/init.pp
Create ssh ed25519 hostkeys on jessie
[dsa-puppet.git] / modules / ssh / manifests / init.pp
index 0824f0f892a6563f16897cb06cc7c4b72829a382..db6130199873f360864db12bed2043752e12e2c7 100644 (file)
@@ -36,4 +36,13 @@ 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',
+                               onlyif  => '! [ -e /etc/ssh/ssh_host_ed25519_key ]'
+                       }
+               }
+       }
 }