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" }
|
'': { $sshd_ensure_version = "present" }
|
||||||
}
|
}
|
||||||
case $sshd_print_motd {
|
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 {
|
case $sshd_shared_ip {
|
||||||
'': { $sshd_shared_ip = "no" }
|
'': { $sshd_shared_ip = "no" }
|
||||||
|
|
|
@ -171,7 +171,7 @@ X11Forwarding no
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
#X11DisplayOffset 10
|
#X11DisplayOffset 10
|
||||||
#X11UseLocalhost yes
|
#X11UseLocalhost yes
|
||||||
#PrintMotd yes
|
PrintMotd <%= sshd_print_motd %>
|
||||||
#PrintLastLog yes
|
#PrintLastLog yes
|
||||||
#TCPKeepAlive yes
|
#TCPKeepAlive yes
|
||||||
#UseLogin no
|
#UseLogin no
|
||||||
|
|
|
@ -170,9 +170,7 @@ AllowUsers <%= sshd_allowed_users -%>
|
||||||
AllowGroups <%= sshd_allowed_groups %>
|
AllowGroups <%= sshd_allowed_groups %>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
|
|
||||||
<%- if sshd_print_motd.to_s == 'no' then -%>
|
PrintMotd <%= sshd_print_motd %>
|
||||||
PrintMotd no
|
|
||||||
<%- end -%>
|
|
||||||
|
|
||||||
<%- if sshd_hardened_ssl.to_s == 'yes' then -%>
|
<%- if sshd_hardened_ssl.to_s == 'yes' then -%>
|
||||||
Ciphers aes256-ctr
|
Ciphers aes256-ctr
|
||||||
|
|
|
@ -179,9 +179,7 @@ AllowUsers <%= sshd_allowed_users -%>
|
||||||
AllowGroups <%= sshd_allowed_groups %>
|
AllowGroups <%= sshd_allowed_groups %>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
|
|
||||||
<%- if sshd_print_motd.to_s == 'no' then -%>
|
PrintMotd <%= sshd_print_motd %>
|
||||||
PrintMotd no
|
|
||||||
<%- end -%>
|
|
||||||
|
|
||||||
<%- if sshd_hardened_ssl.to_s == 'yes' then -%>
|
<%- if sshd_hardened_ssl.to_s == 'yes' then -%>
|
||||||
Ciphers aes256-ctr
|
Ciphers aes256-ctr
|
||||||
|
|
|
@ -145,7 +145,7 @@ X11Forwarding yes
|
||||||
X11Forwarding no
|
X11Forwarding no
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
X11DisplayOffset 10
|
X11DisplayOffset 10
|
||||||
PrintMotd no
|
PrintMotd <%= sshd_print_motd %>
|
||||||
PrintLastLog yes
|
PrintLastLog yes
|
||||||
TCPKeepAlive yes
|
TCPKeepAlive yes
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ X11Forwarding yes
|
||||||
X11Forwarding no
|
X11Forwarding no
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
X11DisplayOffset 10
|
X11DisplayOffset 10
|
||||||
PrintMotd no
|
PrintMotd <%= sshd_print_motd %>
|
||||||
PrintLastLog yes
|
PrintLastLog yes
|
||||||
TCPKeepAlive yes
|
TCPKeepAlive yes
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@ X11Forwarding no
|
||||||
|
|
||||||
X11DisplayOffset 10
|
X11DisplayOffset 10
|
||||||
#X11UseLocalhost yes
|
#X11UseLocalhost yes
|
||||||
#PrintMotd yes
|
PrintMotd <%= sshd_print_motd %>
|
||||||
#PrintLastLog yes
|
#PrintLastLog yes
|
||||||
TCPKeepAlive yes
|
TCPKeepAlive yes
|
||||||
#UseLogin no
|
#UseLogin no
|
||||||
|
|
|
@ -171,7 +171,7 @@ X11Forwarding no
|
||||||
<%- end %>
|
<%- end %>
|
||||||
#X11DisplayOffset 10
|
#X11DisplayOffset 10
|
||||||
#X11UseLocalhost yes
|
#X11UseLocalhost yes
|
||||||
#PrintMotd yes
|
PrintMotd <%= sshd_print_motd %>
|
||||||
#PrintLastLog yes
|
#PrintLastLog yes
|
||||||
#TCPKeepAlive yes
|
#TCPKeepAlive yes
|
||||||
#UseLogin no
|
#UseLogin no
|
||||||
|
|
|
@ -147,7 +147,7 @@ X11Forwarding no
|
||||||
<%- end %>
|
<%- end %>
|
||||||
#X11DisplayOffset 10
|
#X11DisplayOffset 10
|
||||||
#X11UseLocalhost yes
|
#X11UseLocalhost yes
|
||||||
#PrintMotd yes
|
PrintMotd <%= sshd_print_motd %>
|
||||||
#PrintLastLog yes
|
#PrintLastLog yes
|
||||||
#TCPKeepAlive yes
|
#TCPKeepAlive yes
|
||||||
#UseLogin no
|
#UseLogin no
|
||||||
|
|
|
@ -180,9 +180,7 @@ AllowUsers <%= sshd_allowed_users -%>
|
||||||
AllowGroups <%= sshd_allowed_groups %>
|
AllowGroups <%= sshd_allowed_groups %>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
|
|
||||||
<%- if sshd_print_motd.to_s == 'no' then -%>
|
PrintMotd <%= sshd_print_motd %>
|
||||||
PrintMotd no
|
|
||||||
<%- end -%>
|
|
||||||
|
|
||||||
<%- unless sshd_tail_additional_options.to_s.empty? then %>
|
<%- unless sshd_tail_additional_options.to_s.empty? then %>
|
||||||
<%= sshd_tail_additional_options %>
|
<%= sshd_tail_additional_options %>
|
||||||
|
|
Loading…
Reference in a new issue