diff --git a/manifests/config.pp b/manifests/config.pp index a45252d..0f48fff 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -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', diff --git a/spec/classes/config_spec.rb b/spec/classes/config_spec.rb index c3722f4..c8f3750 100644 --- a/spec/classes/config_spec.rb +++ b/spec/classes/config_spec.rb @@ -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'))