diff options
| author | Luke Kanies <luke@puppetlabs.com> | 2011-03-22 19:10:35 -0700 |
|---|---|---|
| committer | Luke Kanies <luke@puppetlabs.com> | 2011-03-22 19:10:35 -0700 |
| commit | 562ae5fb9d78b1a6d46e79bb41d8498f29246f41 (patch) | |
| tree | d8648bb3b0ac24657dcd9ad56e2f8d09b4ffc6cc /lib | |
| parent | 562bd0f10be966bef725896af9ec3cdc30771ac6 (diff) | |
| download | puppet-562ae5fb9d78b1a6d46e79bb41d8498f29246f41.tar.gz puppet-562ae5fb9d78b1a6d46e79bb41d8498f29246f41.tar.xz puppet-562ae5fb9d78b1a6d46e79bb41d8498f29246f41.zip | |
WIP - all tests fail
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/interface/action_manager.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/interface/certificate.rb | 22 |
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/puppet/interface/action_manager.rb b/lib/puppet/interface/action_manager.rb index 8629b4cbe..0db82d612 100644 --- a/lib/puppet/interface/action_manager.rb +++ b/lib/puppet/interface/action_manager.rb @@ -31,6 +31,6 @@ module Puppet::Interface::ActionManager end def action?(name) - actions.include?(name) + actions.include?(name.to_sym) end end diff --git a/lib/puppet/interface/certificate.rb b/lib/puppet/interface/certificate.rb index 32415ea9d..9b9496977 100644 --- a/lib/puppet/interface/certificate.rb +++ b/lib/puppet/interface/certificate.rb @@ -1,20 +1,20 @@ require 'puppet/interface/indirector' Puppet::Interface::Indirector.interface(:certificate) do - action :sign do |name| - unless indirection.terminus - raise ArgumentError, "You must have a CA specified; use --ca-location to specify the location (remote, local, only)" - end + invoke do |name| + unless Puppet::SSL::Host.ca_location + raise ArgumentError, "You must have a CA location specified; use --ca-location to specify the location (remote, local, only)" + end - location = Puppet::SSL::Host.ca_location - if location == :local && !Puppet::SSL::CertificateAuthority.ca? - Puppet::Application[:certificate].class.run_mode("master") - set_run_mode Puppet::Application[:certificate].class.run_mode - end + location = Puppet::SSL::Host.ca_location + if location == :local && !Puppet::SSL::CertificateAuthority.ca? + Puppet::Application[:certificate].class.run_mode("master") + set_run_mode Puppet::Application[:certificate].class.run_mode + end - Puppet::SSL::Host.indirection.save(Puppet::SSL::Host.new(name)) + Puppet::SSL::Host.indirection.save(Puppet::SSL::Host.new(name)) + end end - end |
