From bbc03d2c1069d42ea96101c54186e034b3a06f9b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 27 Dec 2009 14:01:55 -0200 Subject: PrintMotd using default OpenSSH setting --- manifests/init.pp | 3 +++ templates/sshd_config/Debian_etch.erb | 4 +++- templates/sshd_config/Debian_lenny.erb | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index ead475d..ba48b8c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -211,6 +211,9 @@ class sshd { case $sshd_ensure_version { '': { $sshd_ensure_version = "present" } } + case $sshd_print_motd { + '': { $sshd_print_motd = "yes" } + } include sshd::client diff --git a/templates/sshd_config/Debian_etch.erb b/templates/sshd_config/Debian_etch.erb index 746a447..7a38cc4 100644 --- a/templates/sshd_config/Debian_etch.erb +++ b/templates/sshd_config/Debian_etch.erb @@ -176,7 +176,9 @@ AllowUsers <%= sshd_allowed_users -%> AllowGroups <%= sshd_allowed_groups %> <%- end %> -PrintMotd no +<%- if sshd_print_motd.to_s == 'no' then -%> + PrintMotd no +<%- end -%> <%- unless sshd_tail_additional_options.to_s.empty? then %> <%= sshd_tail_additional_options %> diff --git a/templates/sshd_config/Debian_lenny.erb b/templates/sshd_config/Debian_lenny.erb index 18f3e4d..5f7afb4 100644 --- a/templates/sshd_config/Debian_lenny.erb +++ b/templates/sshd_config/Debian_lenny.erb @@ -182,7 +182,9 @@ AllowUsers <%= sshd_allowed_users -%> AllowGroups <%= sshd_allowed_groups %> <%- end %> +<%- if sshd_print_motd.to_s == 'no' then -%> PrintMotd no +<%- end -%> <%- unless sshd_tail_additional_options.to_s.empty? then %> <%= sshd_tail_additional_options %> -- cgit v1.2.3