summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2019-08-12 21:27:56 +0200
committerJan Dittberner <jandd@cacert.org>2019-08-12 21:27:56 +0200
commitbd147499defde0c5b3be9ce5f411b99f7c8c6e35 (patch)
treedfef7d39df3b89de62ee3a093db79d4ec0b5549e
parent4cf7841fad55a39723a166fbcb9ce4d18f823c82 (diff)
downloadcacert-puppet-bd147499defde0c5b3be9ce5f411b99f7c8c6e35.tar.gz
cacert-puppet-bd147499defde0c5b3be9ce5f411b99f7c8c6e35.tar.xz
cacert-puppet-bd147499defde0c5b3be9ce5f411b99f7c8c6e35.zip
Move CAcert repository setup to includeable profile
-rw-r--r--sitemodules/profiles/manifests/cacert_boardvoting.pp13
-rw-r--r--sitemodules/profiles/manifests/cacert_debrepo.pp35
2 files changed, 37 insertions, 11 deletions
diff --git a/sitemodules/profiles/manifests/cacert_boardvoting.pp b/sitemodules/profiles/manifests/cacert_boardvoting.pp
index e44e03a..e0de9b3 100644
--- a/sitemodules/profiles/manifests/cacert_boardvoting.pp
+++ b/sitemodules/profiles/manifests/cacert_boardvoting.pp
@@ -67,19 +67,10 @@ class profiles::cacert_boardvoting (
String $server_private_key,
String $vote_notice_mail_address = 'cacert-board-votes@lists.cacert.org',
) {
- include apt
- apt::key { 'cacert':
- id => '4C4F8164EFE3DAFEC82F22FC82D61CAA4E904466',
- source => 'http://webstatic.infra.cacert.org/cacert-debian-archive-2019.gpg',
- options => 'http-proxy=http://proxyout:3128',
- }
- apt::source { 'cacert':
- location => 'http://webstatic.infra.cacert.org',
- repos => 'main',
- release => "${::lsbdistcodename}-cacert",
- } ->
+ include profiles::cacert_debrepo
package { 'cacert-boardvoting':
ensure => latest,
+ require => Apt::Source['cacert'],
} ->
file { '/srv/cacert-boardvoting/config.yaml':
ensure => file,
diff --git a/sitemodules/profiles/manifests/cacert_debrepo.pp b/sitemodules/profiles/manifests/cacert_debrepo.pp
new file mode 100644
index 0000000..33e6295
--- /dev/null
+++ b/sitemodules/profiles/manifests/cacert_debrepo.pp
@@ -0,0 +1,35 @@
+# Class: profiles::cacert_debrepo
+# ===============================
+#
+# Setup for the CAcert internal debian repository.
+#
+# This manifest is meant to be included from other manifests.
+#
+# Examples
+# --------
+#
+# @example
+# include profiles::cacert_debrepo
+#
+# Authors
+# -------
+#
+# Jan Dittberner <jandd@cacert.org>
+#
+# Copyright
+# ---------
+#
+# Copyright 2019 Jan Dittberner
+class profiles::icinga2_common () {
+ include apt
+ apt::key { 'cacert':
+ id => '4C4F8164EFE3DAFEC82F22FC82D61CAA4E904466',
+ source => 'http://webstatic.infra.cacert.org/cacert-debian-archive-2019.gpg',
+ options => 'http-proxy=http://proxyout:3128',
+ }
+ apt::source { 'cacert':
+ location => 'http://webstatic.infra.cacert.org',
+ repos => 'main',
+ release => "${::lsbdistcodename}-cacert",
+ }
+}