Skip to content

Instantly share code, notes, and snippets.

@hunner
Created May 1, 2013 19:49
Show Gist options
  • Select an option

  • Save hunner/5497832 to your computer and use it in GitHub Desktop.

Select an option

Save hunner/5497832 to your computer and use it in GitHub Desktop.
Revoke puppet certificates on first unchanged run
## modules/revoke_cert/lib/reports/revoke_cert.rb
require 'puppet/face'
Puppet::Reports.register_report(:revoke_cert) do
def process
if self.status == 'unchanged'
Puppet::Face[:certificate, :current].destroy(self.host,{:ca_location => :local})
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment