Skip to content

Commit

Permalink
configurer monkey patch: adapt to different older Puppet versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ffrank committed Feb 25, 2024
1 parent 8ecb8c4 commit 61312ed
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/puppetx/catalog_translation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@ class Puppet::Configurer
def get_simple_catalog
report = Puppet::Transaction::Report.new(nil, @environment, nil, nil)
options = { :report => report }
query_options, facts = get_facts(options)
prepare_and_retrieve_catalog(nil, facts, options, query_options)
if Puppet::Util::Package.versioncmp(Puppet::PUPPETVERSION, '6.14.0') != -1
query_options, facts = get_facts(options)
prepare_and_retrieve_catalog(nil, facts, options, query_options)
else
query_options = get_facts(options)
if Puppet::Util::Package.versioncmp(Puppet::PUPPETVERSION, '6.12.0') != -1
prepare_and_retrieve_catalog(nil, options, query_options)
else
prepare_and_retrieve_catalog(options, query_options)
end
end
end
end

Expand Down

0 comments on commit 61312ed

Please sign in to comment.