Sha256: 975e3bea5eb7111f8b93eace6a78111257275d2370af3752a176bccfc2240f54
Contents?: true
Size: 598 Bytes
Versions: 17
Compression:
Stored size: 598 Bytes
Contents
require 'puppetfactory' class Puppetfactory::Plugins::Certificates < Puppetfactory::Plugins def initialize(options) super(options) @puppet = options[:puppet] @suffix = options[:usersuffix] end def delete(username) certname = "#{username}.#{@suffix}" output, status = Open3.capture2e('puppet', 'cert', 'clean', certname) unless status.success? $logger.warn "Error cleaning certificate #{certname}: #{output}" return false end $logger.info "Certificate #{certname} removed" true end def repair(username) delete(username) end end
Version data entries
17 entries across 17 versions & 1 rubygems