2015-08-31 11:54:28 +02:00
|
|
|
define apt::key ($source, $ensure = 'present') {
|
2015-08-31 12:00:09 +02:00
|
|
|
validate_re(
|
|
|
|
$name, '\.gpg$',
|
|
|
|
'An apt::key resource name must have the .gpg extension',
|
|
|
|
)
|
|
|
|
|
2015-06-11 16:07:47 +02:00
|
|
|
file {
|
2015-08-31 11:54:28 +02:00
|
|
|
"/etc/apt/trusted.gpg.d/${name}":
|
2015-06-11 16:21:56 +02:00
|
|
|
ensure => $ensure,
|
2015-08-31 11:54:28 +02:00
|
|
|
source => $source,
|
2015-06-11 16:21:56 +02:00
|
|
|
notify => Exec['refresh_apt'],
|
2015-06-11 16:07:47 +02:00
|
|
|
}
|
|
|
|
}
|