aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2015-08-31 09:51:45 +0000
committerintrigeri <intrigeri@boum.org>2015-08-31 09:51:45 +0000
commit1e81ba185e3d1bd598542aa1e58fe6ae9389af87 (patch)
treed5d6b98844b11eb9eb52ba52ae59fe97c6d9daf2 /manifests
parent58cfaa32f9de6c38157b2680fbf59da400b8f940 (diff)
parent544796e0502e1377fc374bc9092a0ae8d8392be0 (diff)
downloadpuppet-apt-1e81ba185e3d1bd598542aa1e58fe6ae9389af87.tar.gz
puppet-apt-1e81ba185e3d1bd598542aa1e58fe6ae9389af87.tar.bz2
Merge remote-tracking branch 'shared/key' into tmp
Diffstat (limited to 'manifests')
-rw-r--r--manifests/key.pp8
-rw-r--r--manifests/key/plain.pp13
2 files changed, 21 insertions, 0 deletions
diff --git a/manifests/key.pp b/manifests/key.pp
new file mode 100644
index 0000000..b396c1e
--- /dev/null
+++ b/manifests/key.pp
@@ -0,0 +1,8 @@
+define apt::key ($ensure = 'present', $source) {
+ file {
+ "/etc/apt/trusted.gpg.d/$name":
+ source => $source,
+ ensure => $ensure,
+ notify => Exec['refresh_apt'],
+ }
+}
diff --git a/manifests/key/plain.pp b/manifests/key/plain.pp
new file mode 100644
index 0000000..a24a51b
--- /dev/null
+++ b/manifests/key/plain.pp
@@ -0,0 +1,13 @@
+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'],
+ }
+}