summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2019-08-12 22:13:05 +0200
committerJan Dittberner <jandd@cacert.org>2019-08-12 22:13:05 +0200
commit43adca0a89f3bd5945a61cc1891fa4e8fbd7c41b (patch)
tree5b38374736c0d075bc2499d4fd1ec71acad73612
parenta0c69d53657ed58efd3374906220ccde65cf1d66 (diff)
downloadcacert-puppet-43adca0a89f3bd5945a61cc1891fa4e8fbd7c41b.tar.gz
cacert-puppet-43adca0a89f3bd5945a61cc1891fa4e8fbd7c41b.tar.xz
cacert-puppet-43adca0a89f3bd5945a61cc1891fa4e8fbd7c41b.zip
Install cacert_selfservice_api on email
-rw-r--r--sitemodules/profiles/manifests/cacert_selfservice_api.pp50
-rw-r--r--sitemodules/roles/manifests/email.pp1
2 files changed, 51 insertions, 0 deletions
diff --git a/sitemodules/profiles/manifests/cacert_selfservice_api.pp b/sitemodules/profiles/manifests/cacert_selfservice_api.pp
new file mode 100644
index 0000000..a1e9f0d
--- /dev/null
+++ b/sitemodules/profiles/manifests/cacert_selfservice_api.pp
@@ -0,0 +1,50 @@
+# Class: profiles::cacert_selfservice_api
+# =======================================
+#
+# This class defines the cacert_selfservice_api profile that installs the
+# CAcert community self service system API backend
+#
+# Examples
+# --------
+#
+# @example
+# class roles::myhost {
+# include profiles::cacert_selfservice_api
+# }
+#
+# Authors
+# -------
+#
+# Jan Dittberner <jandd@cacert.org>
+#
+# Copyright
+# ---------
+#
+# Copyright 2019 Jan Dittberner
+#
+class profiles::cacert_selfservice_api (
+) {
+ include profiles::cacert_debrepo
+
+ $service_name = 'cacert-selfservice'
+ $log_directory = "/var/log/${service_name}"
+
+ package { $service_name:
+ ensure => latest,
+ require => Apt::Source['cacert'],
+ }
+
+ file { $log_directory:
+ ensure => directory,
+ owner => $service_name,
+ group => 'root',
+ mode => '0750',
+ require => Package[$service_name],
+ }
+
+ service { $service_name:
+ ensure => running,
+ enable => true,
+ require => Package[$service_name],
+ }
+}
diff --git a/sitemodules/roles/manifests/email.pp b/sitemodules/roles/manifests/email.pp
index 2a47eee..b86844d 100644
--- a/sitemodules/roles/manifests/email.pp
+++ b/sitemodules/roles/manifests/email.pp
@@ -24,4 +24,5 @@ class roles::email {
include profiles::base
include profiles::rsyslog
include profiles::icinga2_agent
+ include profiles::cacert_selfservice_api
}