8745de17d6
This is not perfect protection against special chars that the shell may interpret, but should help at least in case $name contains spaces.
13 lines
369 B
Puppet
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'],
|
|
}
|
|
}
|