From 9e8c60a8b73fd96393b08d690c7197e62aae623e Mon Sep 17 00:00:00 2001 From: Jeff McCune Date: Thu, 25 Oct 2012 15:42:05 -0700 Subject: Revert "Merge branch '2.5.x' into 3.0.x" This reverts commit c8c7afc7a00aaeeddea6514d9fe9508513e53a73, reversing changes made to 03ec16e291a70ac5ac412be36ae3b86a771b98af. This was a mistake on my part. 2.5 is a minor release and minor releases should never be merged into patch level branches. 2.5.x should have been merged into 3.1.x instead. --- lib/facter/pe_version.rb | 53 ------------------------------------------------ 1 file changed, 53 deletions(-) delete mode 100644 lib/facter/pe_version.rb (limited to 'lib/facter/pe_version.rb') diff --git a/lib/facter/pe_version.rb b/lib/facter/pe_version.rb deleted file mode 100644 index 0cc0f64..0000000 --- a/lib/facter/pe_version.rb +++ /dev/null @@ -1,53 +0,0 @@ -# Fact: is_pe, pe_version, pe_major_version, pe_minor_version, pe_patch_version -# -# Purpose: Return various facts about the PE state of the system -# -# Resolution: Uses a regex match against puppetversion to determine whether the -# machine has Puppet Enterprise installed, and what version (overall, major, -# minor, patch) is installed. -# -# Caveats: -# -Facter.add("pe_version") do - setcode do - pe_ver = Facter.value("puppetversion").match(/Puppet Enterprise (\d+\.\d+\.\d+)/) - pe_ver[1] if pe_ver - end -end - -Facter.add("is_pe") do - setcode do - if Facter.value(:pe_version).to_s.empty? then - false - else - true - end - end -end - -Facter.add("pe_major_version") do - confine :is_pe => true - setcode do - if pe_version = Facter.value(:pe_version) - pe_version.to_s.split('.')[0] - end - end -end - -Facter.add("pe_minor_version") do - confine :is_pe => true - setcode do - if pe_version = Facter.value(:pe_version) - pe_version.to_s.split('.')[1] - end - end -end - -Facter.add("pe_patch_version") do - confine :is_pe => true - setcode do - if pe_version = Facter.value(:pe_version) - pe_version.to_s.split('.')[2] - end - end -end -- cgit v1.2.3