Skip to content

Commit

Permalink
Made the test for whether faillock should be implemented or not also …
Browse files Browse the repository at this point in the history
…look at os family
  • Loading branch information
michael-riddle committed Jan 29, 2024
1 parent 61d63e7 commit ccdabbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
}
}

# EL 7 doesn't utilize faillock.conf
if ($facts['os']['release']['major'] > '7') and ($pam::manage_faillock_conf) {
# EL 7 doesn't utilize faillock.conf and will break if used
if ($facts['os']['family'] == 'RedHat') and ($facts['os']['release']['major'] > '7') and ($pam::manage_faillock_conf) {
if ($pam::faillock_log_dir) {
file { $pam::faillock_log_dir:
ensure => 'directory',
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
)
}

if os_facts[:os][:release][:major] <= '7'
if os_facts[:os][:family] == 'RedHat' and os_facts[:os][:release][:major] <= '7'
it {
project_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
expected = IO.read(File.join(project_dir, 'files', 'simp_authconfig.sh'))
Expand Down

0 comments on commit ccdabbb

Please sign in to comment.