File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 4343 # The `is_pe` fact currently works by echoing out the puppet version
4444 # and greping for "puppet enterprise". With Puppet 4 and PE 2015.2, there
4545 # is no longer a "PE Puppet", and so that fact will no longer work.
46- # Instead check for the `is_pe` fact or if a PE provided function is available
47- $_is_pe = (getvar(' ::is_pe' ) or is_function_available(' pe_compiling_server_version' ))
46+ # Instead check for the `is_pe` fact or if the `pe_anchor` resource type
47+ # provided by the puppet_enterprise module exist.
48+ $_is_pe = (getvar(' ::is_pe' ) or defined (' pe_anchor' ))
4849 if $_is_pe {
4950 # Calculate the default collection
5051 $_pe_version = pe_build_version()
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ def global_facts(facts, os)
237237 before ( :each ) do
238238 Puppet ::Parser ::Functions . newfunction ( :pe_build_version , type : :rvalue ) { |_args | '2000.0.0' }
239239 Puppet ::Parser ::Functions . newfunction ( :pe_compiling_server_aio_build , type : :rvalue ) { |_args | '1.10.100' }
240- Puppet ::Parser ::Functions . newfunction ( :pe_compiling_server_version , type : :rvalue ) { |_args | '2.20.200' }
240+ Puppet ::Parser ::Functions . newfunction ( :defined , type : :rvalue ) { |_args | true }
241241 end
242242
243243 context 'package_version is initialized automatically' do
You can’t perform that action at this time.
0 commit comments