Skip to content

Commit

Permalink
rename facts
Browse files Browse the repository at this point in the history
  • Loading branch information
jordiprats committed Apr 5, 2019
1 parent d65f9a9 commit 27ef87c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/facter/eyp_cracklib_facts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,64 +16,64 @@
dcredit = Facter::Util::Resolution.exec('grep ^dcredit /etc/security/pwquality.conf | awk \'{ print $NF }\'').to_s

unless minlen.nil? or minlen.empty?
Facter.add('eyp_cracklib_password_minlen') do
Facter.add('eyp_pam_cracklib_password_minlen') do
setcode do
minlen
end
end
Facter.add('eyp_cracklib_password_minlen_description') do
Facter.add('eyp_pam_cracklib_password_minlen_description') do
setcode do
'Minimum acceptable size for the new password'
end
end
end

unless ocredit.nil? or ocredit.empty?
Facter.add('eyp_cracklib_password_ocredit') do
Facter.add('eyp_pam_cracklib_password_ocredit') do
setcode do
ocredit
end
end
Facter.add('eyp_cracklib_password_ocredit_description') do
Facter.add('eyp_pam_cracklib_password_ocredit_description') do
setcode do
'The maximum credit for having other characters in the new password'
end
end
end

unless lcredit.nil? or lcredit.empty?
Facter.add('eyp_cracklib_password_lcredit') do
Facter.add('eyp_pam_cracklib_password_lcredit') do
setcode do
lcredit
end
end
Facter.add('eyp_cracklib_password_lcredit_description') do
Facter.add('eyp_pam_cracklib_password_lcredit_description') do
setcode do
'The maximum credit for having lowercase characters in the new password'
end
end
end

unless ucredit.nil? or ucredit.empty?
Facter.add('eyp_cracklib_password_ucredit') do
Facter.add('eyp_pam_cracklib_password_ucredit') do
setcode do
ucredit
end
end
Facter.add('eyp_cracklib_password_ucredit_description') do
Facter.add('eyp_pam_cracklib_password_ucredit_description') do
setcode do
'The maximum credit for having uppercase characters in the new password'
end
end
end

unless dcredit.nil? or dcredit.empty?
Facter.add('eyp_cracklib_password_dcredit') do
Facter.add('eyp_pam_cracklib_password_dcredit') do
setcode do
dcredit
end
end
Facter.add('eyp_cracklib_password_dcredit_description') do
Facter.add('eyp_pam_cracklib_password_dcredit_description') do
setcode do
'The maximum credit for having digits in the new password'
end
Expand Down

0 comments on commit 27ef87c

Please sign in to comment.