require 'pathname'
+require 'puppet/parameter/boolean'
Puppet::Type.newtype(:apt_key) do
@doc = <<-MANIFEST
ensurable
validate do
+ if self[:refresh] == true && self[:ensure] == :absent
+ raise(_('ensure => absent and refresh => true are mutually exclusive'))
+ end
if self[:content] && self[:source]
raise(_('The properties content and source are mutually exclusive.'))
end
desc 'Additional options to pass to apt-key\'s --keyserver-options.'
end
+ newparam(:refresh, boolean: true, parent: Puppet::Parameter::Boolean) do
+ desc 'When true, recreate an existing expired key'
+ end
+
newproperty(:fingerprint) do
desc <<-MANIFEST
The 40-digit hexadecimal fingerprint of the specified GPG key.