summaryrefslogtreecommitdiff
path: root/sitemodules/profiles/manifests/cacert_selfservice_api.pp
blob: 904fe7d5c412eca821111ff4bbb5b6b958dceaf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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-api'
  $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],
  }
}