Revision ffbd0e7d
Added by Ohad Levy almost 12 years ago
- ID ffbd0e7d4c39e2ec40b321abf955edfae04d2dd3
lib/proxy/puppetca.rb | ||
---|---|---|
# parse the puppetca --list output
|
||
def certificate str
|
||
case str
|
||
when /(\+|\-)\s+(.*)\s+\((\S+)\)/
|
||
when /(\+|\-)\s+["]{0,1}(.*\w)["]{0,1}\s+\((\S+)\)/
|
||
state = $1 == "-" ? "revoked" : "valid"
|
||
return { $2.strip => { :state => state, :fingerprint => $3 } }
|
||
when /(.*)\s+\((\S+)\)/
|
||
when /\s*["]{0,1}(.*\w)["]{0,1}\s+\((\S+)\)/
|
||
return { $1.strip => { :state => "pending", :fingerprint => $2 } }
|
||
else
|
||
return {}
|
Also available in: Unified diff
fixes #1759 - puppet 2.7.18 changed puppetca output
which result in adding quotes to the certnames.
this patch should cover both cases (older and newer puppet)