module-apt/manifests/key/plain.pp
intrigeri 8745de17d6 Quote apt-key variable parameter.
This is not perfect protection against special chars that the shell may
interpret, but should help at least in case $name contains spaces.
2015-08-31 09:55:17 +00:00

13 lines
369 B
Puppet

define apt::key::plain ($source) {
file {
"${apt::apt_base_dir}/keys/${name}":
source => $source;
"${apt::apt_base_dir}/keys":
ensure => directory;
}
exec { "apt-key add '${apt::apt_base_dir}/keys/${name}'":
subscribe => File["${apt::apt_base_dir}/keys/${name}"],
refreshonly => true,
notify => Exec['refresh_apt'],
}
}