diff --git a/lib/facter/pe_status_check.rb b/lib/facter/pe_status_check.rb index b88685ff..e171d4b3 100644 --- a/lib/facter/pe_status_check.rb +++ b/lib/facter/pe_status_check.rb @@ -236,19 +236,21 @@ # Is there a valid license present, which does not expire in 90 days # Also takes into account if the license type is Perpetual next unless ['primary'].include?(Facter.value('pe_status_check_role')) - + # Check for suite license file suite_license_file = '/etc/puppetlabs/suite-license.lic' - + # Check for license key file license_file = '/etc/puppetlabs/license.key' - + # Initialize validity as false validity = false - + if File.exist?(suite_license_file) # Presence of file satisfy check validity = true + # Approve with only suite-license.liu + { S0022: validity } elsif File.exist?(license_file) begin license_type = File.readlines(license_file).grep(%r{license_type:}).first @@ -281,9 +283,10 @@ # Neither suite-license.lic nor license.key exist validity = false end - + { S0022: validity } end + chunk(:S0023) do # Is the CA_CRL expiring in the next 90 days