From ed11b672c44f85700c940bc0aa690d0d4f324918 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 13 Oct 2016 18:47:58 -0300 Subject: Adds nodo::subsystem::sshd::manage --- manifests/subsystem/sshd.pp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'manifests/subsystem/sshd.pp') diff --git a/manifests/subsystem/sshd.pp b/manifests/subsystem/sshd.pp index 3327de8..c520c9e 100644 --- a/manifests/subsystem/sshd.pp +++ b/manifests/subsystem/sshd.pp @@ -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, + }, + } } } -- cgit v1.2.3