diff options
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/ssl/host.rb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/puppet/ssl/host.rb b/lib/puppet/ssl/host.rb index c1dac2050..931d64ab3 100644 --- a/lib/puppet/ssl/host.rb +++ b/lib/puppet/ssl/host.rb @@ -74,6 +74,16 @@ class Puppet::SSL::Host end end + # Remove all traces of a given host + def self.destroy(name) + [Key, Certificate, CertificateRequest].inject(false) do |result, klass| + if klass.destroy(name) + result = true + end + result + end + end + # Search for more than one host, optionally only specifying # an interest in hosts with a given file type. # This just allows our non-indirected class to have one of @@ -131,13 +141,6 @@ class Puppet::SSL::Host @certificate end - # Remove all traces of this ssl host - def destroy - [key, certificate, certificate_request].each do |instance| - instance.class.destroy(name) if instance - end - end - def initialize(name) @name = name @key = @certificate = @certificate_request = nil |