Adding PrintMotd parameter to all templates and setting per-distro default value
This commit is contained in:
parent
89aeace9b6
commit
0e9e1b6f2c
10 changed files with 15 additions and 16 deletions
|
@ -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" }
|
||||
|
|
|
@ -171,7 +171,7 @@ X11Forwarding no
|
|||
<%- end -%>
|
||||
#X11DisplayOffset 10
|
||||
#X11UseLocalhost yes
|
||||
#PrintMotd yes
|
||||
PrintMotd <%= sshd_print_motd %>
|
||||
#PrintLastLog yes
|
||||
#TCPKeepAlive yes
|
||||
#UseLogin no
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -145,7 +145,7 @@ X11Forwarding yes
|
|||
X11Forwarding no
|
||||
<%- end -%>
|
||||
X11DisplayOffset 10
|
||||
PrintMotd no
|
||||
PrintMotd <%= sshd_print_motd %>
|
||||
PrintLastLog yes
|
||||
TCPKeepAlive yes
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ X11Forwarding yes
|
|||
X11Forwarding no
|
||||
<%- end -%>
|
||||
X11DisplayOffset 10
|
||||
PrintMotd no
|
||||
PrintMotd <%= sshd_print_motd %>
|
||||
PrintLastLog yes
|
||||
TCPKeepAlive yes
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ X11Forwarding no
|
|||
|
||||
X11DisplayOffset 10
|
||||
#X11UseLocalhost yes
|
||||
#PrintMotd yes
|
||||
PrintMotd <%= sshd_print_motd %>
|
||||
#PrintLastLog yes
|
||||
TCPKeepAlive yes
|
||||
#UseLogin no
|
||||
|
|
|
@ -171,7 +171,7 @@ X11Forwarding no
|
|||
<%- end %>
|
||||
#X11DisplayOffset 10
|
||||
#X11UseLocalhost yes
|
||||
#PrintMotd yes
|
||||
PrintMotd <%= sshd_print_motd %>
|
||||
#PrintLastLog yes
|
||||
#TCPKeepAlive yes
|
||||
#UseLogin no
|
||||
|
|
|
@ -147,7 +147,7 @@ X11Forwarding no
|
|||
<%- end %>
|
||||
#X11DisplayOffset 10
|
||||
#X11UseLocalhost yes
|
||||
#PrintMotd yes
|
||||
PrintMotd <%= sshd_print_motd %>
|
||||
#PrintLastLog yes
|
||||
#TCPKeepAlive yes
|
||||
#UseLogin no
|
||||
|
|
|
@ -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 %>
|
||||
|
|
Loading…
Reference in a new issue