diff options
| author | Luke Kanies <luke@madstop.com> | 2008-04-18 11:47:44 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-04-18 11:47:44 -0500 |
| commit | 67f9d6977a21a96bf0a2a4d1d9ebde190a58e7bc (patch) | |
| tree | 4e38a2282df7d4cd979634b54786c66c2cd492b0 /lib/puppet/ssl | |
| parent | 7cca66985a0f84b3904702df842d461c2b6431b7 (diff) | |
| download | puppet-67f9d6977a21a96bf0a2a4d1d9ebde190a58e7bc.tar.gz puppet-67f9d6977a21a96bf0a2a4d1d9ebde190a58e7bc.tar.xz puppet-67f9d6977a21a96bf0a2a4d1d9ebde190a58e7bc.zip | |
Changing the Inventory class to rebuild when the
first cert is added, so it's easier to test.
Diffstat (limited to 'lib/puppet/ssl')
| -rw-r--r-- | lib/puppet/ssl/inventory.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/puppet/ssl/inventory.rb b/lib/puppet/ssl/inventory.rb index 3deb19852..b701270b9 100644 --- a/lib/puppet/ssl/inventory.rb +++ b/lib/puppet/ssl/inventory.rb @@ -7,6 +7,9 @@ class Puppet::SSL::Inventory # Add a certificate to our inventory. def add(cert) + # Create our file, if one does not already exist. + rebuild unless FileTest.exist?(@path) + Puppet.settings.write(:cert_inventory, "a") do |f| f.print format(cert) end @@ -20,8 +23,6 @@ class Puppet::SSL::Inventory def initialize @path = Puppet[:cert_inventory] - - rebuild unless FileTest.exist?(@path) end # Rebuild the inventory from scratch. This should happen if |
