Signed-off-by: Corey Osman <corey@logicminds.biz>
···
--- lib/proxy/puppetca.rb | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)diff --git a/lib/proxy/puppetca.rb b/lib/proxy/puppetca.rb
index b952ce6…668a6b0 100644
— a/lib/proxy/puppetca.rb
+++ b/lib/proxy/puppetca.rb
@@ -97,11 +97,17 @@ module Proxy::PuppetCA
raise "SSL/CA unavailable on this machine"
end
-
@puppetca = which("puppetca", "/usr/sbin")
-
unless File.exists?("#{@puppetca}")
-
# puppetca is the old method of using puppet cert which is new in puppet 2.6
-
default_path = ["/usr/sbin","/opt/puppet/bin"]
-
@puppetca = which("puppetca", default_path) || which("puppet", default_path)
-
unless File.exists?("#{@puppetca}") logger.warn "unable to find puppetca binary" raise "unable to find puppetca" end
-
# Append cert to the puppet command if we are not using the old puppetca command
-
if not @puppetca.include? 'puppetca'
-
@puppetca << " cert"
-
end logger.debug "Found puppetca at #{@puppetca}" @sudo = which("sudo", "/usr/bin")
–
1.7.4.1