Adding PrintMotd parameter to all templates and setting per-distro default value

This commit is contained in:
Silvio Rhatto 2011-07-21 11:01:33 -03:00
parent 89aeace9b6
commit 0e9e1b6f2c
10 changed files with 15 additions and 16 deletions

View 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" }

View file

@ -171,7 +171,7 @@ X11Forwarding no
<%- end -%>
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
PrintMotd <%= sshd_print_motd %>
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no

View 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

View 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

View file

@ -145,7 +145,7 @@ X11Forwarding yes
X11Forwarding no
<%- end -%>
X11DisplayOffset 10
PrintMotd no
PrintMotd <%= sshd_print_motd %>
PrintLastLog yes
TCPKeepAlive yes

View file

@ -145,7 +145,7 @@ X11Forwarding yes
X11Forwarding no
<%- end -%>
X11DisplayOffset 10
PrintMotd no
PrintMotd <%= sshd_print_motd %>
PrintLastLog yes
TCPKeepAlive yes

View file

@ -193,7 +193,7 @@ X11Forwarding no
X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
PrintMotd <%= sshd_print_motd %>
#PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

View file

@ -171,7 +171,7 @@ X11Forwarding no
<%- end %>
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
PrintMotd <%= sshd_print_motd %>
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no

View file

@ -147,7 +147,7 @@ X11Forwarding no
<%- end %>
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
PrintMotd <%= sshd_print_motd %>
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no

View 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 %>