5f7232b420
It's great to document requirements in README, but error'ing out whenever the user messes up is even better IMO.
13 lines
292 B
Puppet
13 lines
292 B
Puppet
define apt::key ($source, $ensure = 'present') {
|
|
validate_re(
|
|
$name, '\.gpg$',
|
|
'An apt::key resource name must have the .gpg extension',
|
|
)
|
|
|
|
file {
|
|
"/etc/apt/trusted.gpg.d/${name}":
|
|
ensure => $ensure,
|
|
source => $source,
|
|
notify => Exec['refresh_apt'],
|
|
}
|
|
}
|