Install cacert_selfservice_api on email
authorJan Dittberner <jandd@cacert.org>
Mon, 12 Aug 2019 20:13:05 +0000 (22:13 +0200)
committerJan Dittberner <jandd@cacert.org>
Mon, 12 Aug 2019 20:13:05 +0000 (22:13 +0200)
sitemodules/profiles/manifests/cacert_selfservice_api.pp [new file with mode: 0644]
sitemodules/roles/manifests/email.pp

diff --git a/sitemodules/profiles/manifests/cacert_selfservice_api.pp b/sitemodules/profiles/manifests/cacert_selfservice_api.pp
new file mode 100644 (file)
index 0000000..a1e9f0d
--- /dev/null
@@ -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],
+  }
+}
index 2a47eee..b86844d 100644 (file)
@@ -24,4 +24,5 @@ class roles::email {
   include profiles::base
   include profiles::rsyslog
   include profiles::icinga2_agent
+  include profiles::cacert_selfservice_api
 }