aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorAntoine Beaupré <anarcat@koumbit.org>2015-06-11 10:07:47 -0400
committerAntoine Beaupré <anarcat@koumbit.org>2015-06-11 10:07:49 -0400
commit33acc00e5c6d8ab18f2992cccc8ee036b4d7771d (patch)
treed4191c6abfae9ec0c6c6b7cdd4f971c91671afaa /manifests
parentd87876a16fdf6cb710210b1a11572d553dec755a (diff)
downloadpuppet-apt-33acc00e5c6d8ab18f2992cccc8ee036b4d7771d.tar.gz
puppet-apt-33acc00e5c6d8ab18f2992cccc8ee036b4d7771d.tar.bz2
add apt::key resource to deploy arbitrary keys
the rationale of this is that isn't useful for third party modules, because they cannot inject keys in there without some serious apt class hijacking
Diffstat (limited to 'manifests')
-rw-r--r--manifests/key.pp13
1 files changed, 13 insertions, 0 deletions
diff --git a/manifests/key.pp b/manifests/key.pp
new file mode 100644
index 0000000..0ef9721
--- /dev/null
+++ b/manifests/key.pp
@@ -0,0 +1,13 @@
+define apt::key ($source) {
+ file {
+ "${apt::apt_base_dir}/${name}":
+ source => $source;
+ "${apt::apt_base_dir}/keys":
+ ensure => directory;
+ }
+ exec { "apt-key add ${apt::apt_base_dir}/${name}":
+ subscribe => File["${apt::apt_base_dir}/${name}"],
+ refreshonly => true,
+ notify => Exec['refresh_apt'],
+ }
+}