Skip to content

Commit

Permalink
v0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mpasternacki committed Apr 9, 2014
1 parent 0b48465 commit 28d6ae2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Change History
==============

0.2.3
-----
- Fix bugs

0.2.2
-----
- Moved rake task to files/ to have it packaged
Expand Down
2 changes: 2 additions & 0 deletions files/tasks/ssl-key-vault.rake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ CERTIFICATE_DIR = 'config/certificates' unless defined? CERTIFICATE_DIR
# CERTIFICATE_SUBJ = nil
CERTIFICATE_JSON = FileList[File.join(CERTIFICATE_DIR, '*.key')].ext('json')

autoload :JSON, 'json'

rule '.json' => [ '.key', '.crt' ] do |t|
basepath = File.join(File.dirname(t.name), File.basename(t.name, '.json'))
inputs = Dir["#{basepath}.*"].reject { |path| path == t.name || path =~ /~$/ }
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
license 'MIT'
description "SSL key & certificate storage in chef-vault"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.2.2'
version '0.2.3'

supports 'ubuntu'
7 changes: 6 additions & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
end

node['ssl_certificates'].to_hash.each do |name, certificates|
item = ChefVault::Item.load('certs', "ssl-key-#{name.gsub(/[^a-z0-9]/, '_')}")
begin
item = ChefVault::Item.load('certs', "ssl-key-#{name.gsub(/[^a-z0-9]/, '_')}")
rescue ChefVault::Exceptions::KeysNotFound, ChefVault::Exceptions::SecretDecryption
node.save
raise
end

certificates =
case certificates
Expand Down

0 comments on commit 28d6ae2

Please sign in to comment.