diff options
Diffstat (limited to 'lib/puppet/ssl/host.rb')
-rw-r--r-- | lib/puppet/ssl/host.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/puppet/ssl/host.rb b/lib/puppet/ssl/host.rb index 08a8ace1f..a06b1e275 100644 --- a/lib/puppet/ssl/host.rb +++ b/lib/puppet/ssl/host.rb @@ -27,10 +27,11 @@ class Puppet::SSL::Host attr_accessor :desired_state def self.localhost - @localhost ||= new.tap do |l| - l.generate unless l.certificate - l.key # Make sure it's read in - end + return @localhost if @localhost + @localhost = new + @localhost.generate unless @localhost.certificate + @localhost.key + @localhost end # This is the constant that people will use to mark that a given host is |