Fixup gmcgrath's contribution to comply with style

This commit is contained in:
Garrett Honeycutt 2014-08-09 10:35:59 -04:00
parent ec91c40a5a
commit bf53e2f36e
2 changed files with 20 additions and 25 deletions

View File

@ -483,39 +483,34 @@ class ssh (
$supported_loglevel_vals=['QUIET', 'FATAL', 'ERROR', 'INFO', 'VERBOSE'] $supported_loglevel_vals=['QUIET', 'FATAL', 'ERROR', 'INFO', 'VERBOSE']
validate_re($sshd_config_loglevel, $supported_loglevel_vals) validate_re($sshd_config_loglevel, $supported_loglevel_vals)
#enable hiera merging for allow groups and allow users #enable hiera merging for allow groups and allow users
if $hiera_merge_real == true { if $hiera_merge_real == true {
$real_sshd_config_denygroups = hiera_array('ssh::sshd_config_denygroups', undef) $sshd_config_denygroups_real = hiera_array('ssh::sshd_config_denygroups', undef)
$real_sshd_config_denyusers = hiera_array('ssh::sshd_config_denyusers', undef) $sshd_config_denyusers_real = hiera_array('ssh::sshd_config_denyusers', undef)
$real_sshd_config_allowgroups = hiera_array('ssh::sshd_config_allowgroups', undef) $sshd_config_allowgroups_real = hiera_array('ssh::sshd_config_allowgroups', undef)
$real_sshd_config_allowusers = hiera_array('ssh::sshd_config_allowusers', undef) $sshd_config_allowusers_real = hiera_array('ssh::sshd_config_allowusers', undef)
} } else {
else{ $sshd_config_denygroups_real = $sshd_config_denygroups
$real_sshd_config_denygroups = $sshd_config_denygroups $sshd_config_denyusers_real = $sshd_config_denyusers
$real_sshd_config_denyusers = $sshd_config_denyusers $sshd_config_allowgroups_real = $sshd_config_allowgroups
$real_sshd_config_allowgroups = $sshd_config_allowgroups $sshd_config_allowusers_real = $sshd_config_allowusers
$real_sshd_config_allowusers = $sshd_config_allowusers }
}
if $real_sshd_config_denyusers != undef { if $real_sshd_config_denyusers != undef {
validate_array($real_sshd_config_denyusers) validate_array($real_sshd_config_denyusers)
} }
if $real_sshd_config_denygroups != undef { if $real_sshd_config_denygroups != undef {
validate_array($real_sshd_config_denygroups) validate_array($real_sshd_config_denygroups)
} }
if $real_sshd_config_allowusers != undef { if $real_sshd_config_allowusers != undef {
validate_array($real_sshd_config_allowusers) validate_array($real_sshd_config_allowusers)
} }
if $real_sshd_config_allowgroups != undef { if $real_sshd_config_allowgroups != undef {
validate_array($real_sshd_config_allowgroups) validate_array($real_sshd_config_allowgroups)
} }
package { $packages_real: package { $packages_real:
ensure => installed, ensure => installed,

View File

@ -167,14 +167,14 @@ Ciphers <%= @sshd_config_ciphers.join(',') %>
MACs <%= @sshd_config_macs.join(',') %> MACs <%= @sshd_config_macs.join(',') %>
<% end -%> <% end -%>
<% if @sshd_config_denyusers -%> <% if @sshd_config_denyusers -%>
DenyUsers <%= @real_sshd_config_denyusers.join(' ') %> DenyUsers <%= @sshd_config_denyusers_real.join(' ') %>
<% end -%> <% end -%>
<% if @sshd_config_denygroups -%> <% if @sshd_config_denygroups -%>
DenyGroups <%= @real_sshd_config_denygroups.join(' ') %> DenyGroups <%= @sshd_config_denygroups_real.join(' ') %>
<% end -%> <% end -%>
<% if @sshd_config_allowusers -%> <% if @sshd_config_allowusers -%>
AllowUsers <%= @real_sshd_config_allowusers.join(' ') %> AllowUsers <%= @sshd_config_allowusers_real.join(' ') %>
<% end -%> <% end -%>
<% if @sshd_config_allowgroups -%> <% if @sshd_config_allowgroups -%>
AllowGroups <%= @real_sshd_config_allowgroups.join(' ') %> AllowGroups <%= @sshd_config_allowgroups_real.join(' ') %>
<% end -%> <% end -%>