]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Adds nodo::subsystem::sshd::manage
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 13 Oct 2016 21:47:58 +0000 (18:47 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 13 Oct 2016 21:47:58 +0000 (18:47 -0300)
manifests/subsystem/sshd.pp

index 3327de8023dbfced0adef104f0e86598cab6274b..c520c9e3c12042b160d547d5def6d34c00bdf128 100644 (file)
@@ -1,14 +1,18 @@
 class nodo::subsystem::sshd {
-  include ::sshd
+  $manage = hiera('nodo::subsystem::sshd::manage', true)
 
-  # 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,
-    },
+  if $manage == true {
+    include ::sshd
+
+    # 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,
+      },
+    }
   }
 }