What are some dependable ways to determine whether an agent uses Puppet Enterprise or Opensource? (specific to gem providers and $PATH)
I have a profile that works well with Puppet Opensource but not with Puppet Enterprise because with PO I use rvm but with PE I should use pe_gem to install gems. This causes an issue when rvm installs the puppet gem as a dependency to other gems and the users (even root, since it's rvm) call puppet. The gem is used instead of /opt/puppet/bin/puppet.
I'd like to change the profile to detect the agent that is installed and use either rvm or pe_gem as the situation demands, in the hope of moving this profile into a public forge module. What are some recommended, reliable methods to determine what is in use?