module-apt/manifests/key.pp
intrigeri 5f7232b420 Add validation for apt::key's name.
It's great to document requirements in README, but error'ing out whenever
the user messes up is even better IMO.
2015-08-31 10:01:03 +00:00

13 wiersze
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'],
}
}