904fe7d5c412eca821111ff4bbb5b6b958dceaf8
[cacert-puppet.git] / sitemodules / profiles / manifests / cacert_selfservice_api.pp
1 # Class: profiles::cacert_selfservice_api
2 # =======================================
3 #
4 # This class defines the cacert_selfservice_api profile that installs the
5 # CAcert community self service system API backend
6 #
7 # Examples
8 # --------
9 #
10 # @example
11 # class roles::myhost {
12 # include profiles::cacert_selfservice_api
13 # }
14 #
15 # Authors
16 # -------
17 #
18 # Jan Dittberner <jandd@cacert.org>
19 #
20 # Copyright
21 # ---------
22 #
23 # Copyright 2019 Jan Dittberner
24 #
25 class profiles::cacert_selfservice_api (
26 ) {
27 include profiles::cacert_debrepo
28
29 $service_name = 'cacert-selfservice-api'
30 $log_directory = "/var/log/${service_name}"
31
32 package { $service_name:
33 ensure => latest,
34 require => Apt::Source['cacert'],
35 }
36
37 file { $log_directory:
38 ensure => directory,
39 owner => $service_name,
40 group => 'root',
41 mode => '0750',
42 require => Package[$service_name],
43 }
44
45 service { $service_name:
46 ensure => running,
47 enable => true,
48 require => Package[$service_name],
49 }
50 }