]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
Adding PrintMotd parameter to all templates and setting per-distro default value
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 21 Jul 2011 14:01:33 +0000 (11:01 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 21 Jul 2011 14:01:33 +0000 (11:01 -0300)
manifests/init.pp
templates/sshd_config/CentOS.erb
templates/sshd_config/Debian_etch.erb
templates/sshd_config/Debian_lenny.erb
templates/sshd_config/Debian_sid.erb
templates/sshd_config/Debian_squeeze.erb
templates/sshd_config/FreeBSD.erb
templates/sshd_config/Gentoo.erb
templates/sshd_config/OpenBSD.erb
templates/sshd_config/Ubuntu_lucid.erb

index 66b72628ba3bd16ea85461ea28ba7d2e260aeb55..8b3361c2fc55b001b2e9223658b7f07945301305 100644 (file)
@@ -93,7 +93,12 @@ class sshd {
     '': { $sshd_ensure_version = "present" }
   }
   case $sshd_print_motd {
-    '': { $sshd_print_motd = "yes" }
+    '': {
+      case $operatingsystem {
+        debian,ubuntu: { $sshd_print_motd = "no" }
+        default: { $sshd_print_motd = "yes" }
+      }
+    }
   }
   case $sshd_shared_ip {
     '': { $sshd_shared_ip = "no" }
index 859759a9e77507b4fe46bc4ee7cf3077b455d823..3d5b5b09ec26795e2f6ce5a3bd8f284a7c222f2e 100644 (file)
@@ -171,7 +171,7 @@ X11Forwarding no
 <%- end -%>
 #X11DisplayOffset 10
 #X11UseLocalhost yes
-#PrintMotd yes
+PrintMotd <%= sshd_print_motd %>
 #PrintLastLog yes
 #TCPKeepAlive yes
 #UseLogin no
index dbef8b848f87c5b9854cedb5d440e441e16feaa2..104722209cc07c973d9e41799580617f24b73675 100644 (file)
@@ -170,9 +170,7 @@ AllowUsers <%= sshd_allowed_users -%>
 AllowGroups <%= sshd_allowed_groups %>
 <%- end %>
 
-<%- if sshd_print_motd.to_s == 'no' then -%>
-  PrintMotd no
-<%- end -%>
+PrintMotd <%= sshd_print_motd %>
 
 <%- if sshd_hardened_ssl.to_s == 'yes' then -%>
 Ciphers aes256-ctr
index c168114d23deb6f6bcf106a70179f99bb0626b27..4ffb94c2c05b8377f12861a886cc41c8a3ca98e8 100644 (file)
@@ -179,9 +179,7 @@ AllowUsers <%= sshd_allowed_users -%>
 AllowGroups <%= sshd_allowed_groups %>
 <%- end %>
 
-<%- if sshd_print_motd.to_s == 'no' then -%>
-PrintMotd no
-<%- end -%>
+PrintMotd <%= sshd_print_motd %>
 
 <%- if sshd_hardened_ssl.to_s == 'yes' then -%>
 Ciphers aes256-ctr
index 0213342e2426f7073b4cc2360822c8dc58c3512a..b211708b46e57b200553296c1dbe3688ef153554 100644 (file)
@@ -145,7 +145,7 @@ X11Forwarding yes
 X11Forwarding no
 <%- end -%>
 X11DisplayOffset 10
-PrintMotd no
+PrintMotd <%= sshd_print_motd %>
 PrintLastLog yes
 TCPKeepAlive yes
 
index dfebcc3777c4565c14495e55f2754d299c8a50f6..fb58e72948088b827cdd10a3d25f39312144c41a 100644 (file)
@@ -145,7 +145,7 @@ X11Forwarding yes
 X11Forwarding no
 <%- end -%>
 X11DisplayOffset 10
-PrintMotd no
+PrintMotd <%= sshd_print_motd %>
 PrintLastLog yes
 TCPKeepAlive yes
 
index 38738bca79f2c2f99daa859e218a5cfc21b297bf..9853f5da379d78845fc56bc9aecdc728ffbeecfb 100644 (file)
@@ -193,7 +193,7 @@ X11Forwarding no
 
 X11DisplayOffset 10
 #X11UseLocalhost yes
-#PrintMotd yes
+PrintMotd <%= sshd_print_motd %>
 #PrintLastLog yes
 TCPKeepAlive yes
 #UseLogin no
index 38674ce5c699fc84384b8df2a40de20690b88c85..8581804c9cca57be1032d7747fdab81b133afedb 100644 (file)
@@ -171,7 +171,7 @@ X11Forwarding no
 <%- end %>
 #X11DisplayOffset 10
 #X11UseLocalhost yes
-#PrintMotd yes
+PrintMotd <%= sshd_print_motd %>
 #PrintLastLog yes
 #TCPKeepAlive yes
 #UseLogin no
index 7a20cd9c7f9e580c7b47c12a19c916187b7cb7b7..b6def87cd553e5661af0dd4a39c2b2f91cb8b8fe 100644 (file)
@@ -147,7 +147,7 @@ X11Forwarding no
 <%- end %>
 #X11DisplayOffset 10
 #X11UseLocalhost yes
-#PrintMotd yes
+PrintMotd <%= sshd_print_motd %>
 #PrintLastLog yes
 #TCPKeepAlive yes
 #UseLogin no
index 1c44c7ba7d2c9c34b7ec9ac78620fa29164af088..304558b233b8ea46d4c0d9ec19baa24bddab9b33 100644 (file)
@@ -180,9 +180,7 @@ AllowUsers <%= sshd_allowed_users -%>
 AllowGroups <%= sshd_allowed_groups %>
 <%- end %>
 
-<%- if sshd_print_motd.to_s == 'no' then -%>
-PrintMotd no
-<%- end -%>
+PrintMotd <%= sshd_print_motd %>
 
 <%- unless sshd_tail_additional_options.to_s.empty? then %>
 <%= sshd_tail_additional_options %>