summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/application/puppetca.rb8
-rw-r--r--lib/puppet/ssl/certificate_authority/interface.rb4
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/puppet/application/puppetca.rb b/lib/puppet/application/puppetca.rb
index 68ea3e5fb..b8b8252c5 100644
--- a/lib/puppet/application/puppetca.rb
+++ b/lib/puppet/application/puppetca.rb
@@ -6,7 +6,7 @@ Puppet::Application.new(:puppetca) do
should_parse_config
- attr_accessor :mode, :all, :ca
+ attr_accessor :mode, :all, :signed, :ca
def find_mode(opt)
modes = Puppet::SSL::CertificateAuthority::Interface::INTERFACE_METHODS
@@ -22,6 +22,10 @@ Puppet::Application.new(:puppetca) do
@all = true
end
+ option("--signed", "-s") do
+ @signed = true
+ end
+
option("--debug", "-d") do |arg|
Puppet::Util::Log.level = :debug
end
@@ -39,6 +43,8 @@ Puppet::Application.new(:puppetca) do
command(:main) do
if @all
hosts = :all
+ elsif @signed
+ hosts = :signed
else
hosts = ARGV.collect { |h| puts h; h.downcase }
end
diff --git a/lib/puppet/ssl/certificate_authority/interface.rb b/lib/puppet/ssl/certificate_authority/interface.rb
index 3f91434e3..20fd85020 100644
--- a/lib/puppet/ssl/certificate_authority/interface.rb
+++ b/lib/puppet/ssl/certificate_authority/interface.rb
@@ -55,6 +55,8 @@ class Puppet::SSL::CertificateAuthority::Interface
if subjects == :all
hosts = [signed, requests].flatten
+ elsif subjects == :signed
+ hosts = signed.flatten
else
hosts = subjects
end
@@ -104,7 +106,7 @@ class Puppet::SSL::CertificateAuthority::Interface
# Set the list of hosts we're operating on. Also supports keywords.
def subjects=(value)
- unless value == :all or value.is_a?(Array)
+ unless value == :all or value == :signed or value.is_a?(Array)
raise ArgumentError, "Subjects must be an array or :all; not %s" % value
end