Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

updated puppet binary location for 2.7/3.0 #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions agent/puppetca/agent/puppetca.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Puppetca<RPC::Agent
:timeout => 20

def startup_hook
@puppetca = @config.pluginconf["puppetca.puppetca"] || "/usr/sbin/puppetca"
@puppetca = @config.pluginconf["puppetca.puppetca"] || "/usr/bin/puppet cert"
@cadir = @config.pluginconf["puppetca.cadir"] || "/var/lib/puppet/ssl/ca"
end

Expand Down Expand Up @@ -47,7 +47,7 @@ def startup_hook
action "revoke" do
validate :certname, :shellsafe

reply[:out] = run("#{@puppetca} --color=none --revoke '#{request[:certname]}'", :stdout => :output, :chomp => true)
reply[:out] = run("#{@puppetca} revoke --color=none '#{request[:certname]}'", :stdout => :output, :chomp => true)
end

# sign a cert if we have one waiting
Expand All @@ -59,7 +59,7 @@ def startup_hook
reply.fail! "Already have a cert for #{certname} not attempting to sign again" if has_cert?(certname)

if cert_waiting?(certname)
reply[:out] = run("#{@puppetca} --color=none --sign '#{request[:certname]}'", :stdout => :output, :chomp => true)
reply[:out] = run("#{@puppetca} sign --color=none '#{request[:certname]}'", :stdout => :output, :chomp => true)
else
reply.fail "No cert found to sign"
end
Expand Down