module-apt/manifests/key.pp
varac f12b007edd [refactor] Unify apt-get update into one resource
Before, there were two Execs that did an `apt-get update`,
`Exec[refresh_apt]` and `Exec[apt_updated]`, which were triggered
by different resources.
This changes gets rid of the first one, and all resources now depend
on `Exec[apt_updated]`.
2016-02-01 20:25:46 +01:00

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['apt_updated'],
}
}