Skip to content

Commit

Permalink
handle refresh (RE: #71) (#75)
Browse files Browse the repository at this point in the history
* refresh support for x509_request and x509_cert

* generate new CSR if config changes, and create new cert
  • Loading branch information
gaima8 authored and raphink committed Jan 10, 2017
1 parent 6437b94 commit 2486e00
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/puppet/type/x509_cert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,8 @@
autorequire(:file) do
self[:private_key]
end

def refresh
provider.create
end
end
4 changes: 4 additions & 0 deletions lib/puppet/type/x509_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,8 @@
autorequire(:file) do
self[:private_key]
end

def refresh
provider.create
end
end
2 changes: 2 additions & 0 deletions manifests/certificate/x509.pp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@
password => $password,
force => $force,
require => File[$_cnf],
subscribe => File[$_cnf],
notify => X509_cert[$_crt],
}

# Set owner of all files
Expand Down

0 comments on commit 2486e00

Please sign in to comment.