Skip to content

Commit

Permalink
Validate
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronoftheages committed Jun 26, 2024
1 parent dbf2707 commit 53a4b49
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/facter/pe_status_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,16 @@
# 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
Expand Down Expand Up @@ -283,10 +283,9 @@
# 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
Expand Down

0 comments on commit 53a4b49

Please sign in to comment.