]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Adding sshkey to localhost
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 11 Apr 2013 19:08:46 +0000 (16:08 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 11 Apr 2013 19:08:46 +0000 (16:08 -0300)
manifests/nodo.pp

index a9cf03701f400c0bef8802fe208c45c269df734a..5fe4ee185df71ba052cf939af316201514584bb0 100644 (file)
@@ -123,6 +123,17 @@ class nodo {
     use_pam                 => hiera('nodo::sshd_use_pam',                 'no'),
   }
 
+  # Add the localhost ssh key, useful when one needs
+  # to ssh to localhost.
+  sshkey { [ 'localhost', '127.0.0.1' ]:
+    type   => ssh-rsa,
+    key    => $::sshrsakey,
+    ensure => $::sshrsakey ? {
+      ''      => absent,
+      default => present,
+    },
+  }
+
   file { "/etc/hostname":
     owner   => "root",
     group   => "root",