| Members of the Puppet Community have requested a standardized best practice to determine if a Puppet Agent is a PE or FOSS Puppet Agent. Since Puppet 4.x, there is no concept of a PE or FOSS Puppet Agent, but a Puppet Agent can be served a catalog by a PE or FOSS Puppet Server. A non-empty pe_version fact would both differentiate between PE or FOSS, but would allow for conditional code depending upon the specific version of PE. The pe_version fact is available in Puppet / PE 3.x. The pe_compiling_server_version function (which calls pe_server_version) is available on a PE Puppet Server after PE 3.x, but is not available on a FOSS Puppet Server, requiring the use of the is_function_available} function to avoid generating an error when calling {{pe_compiling_server_version function on a FOSS Puppet Server. The is_function_available function is itself now deprecated. |