Add boardvoting init script
[cacert-puppet.git] / sitemodules / profiles / manifests / cacert_boardvoting.pp
1 # Class: profiles::cacert_boardvoting
2 # ===================================
3 #
4 # This class defines the cacert_boardvoting profile that configures the CAcert
5 # board voting system.
6 #
7 # Parameters
8 # ----------
9 #
10 # This class has no parameters
11 #
12 # Examples
13 # --------
14 #
15 # @example
16 # class roles::myhost {
17 # include profiles::cacert_boardvoting
18 # }
19 #
20 # Authors
21 # -------
22 #
23 # Jan Dittberner <jandd@cacert.org>
24 #
25 # Copyright
26 # ---------
27 #
28 # Copyright 2018 Jan Dittberner
29 #
30 class profiles::cacert_boardvoting () {
31 group { 'boardvoting':
32 ensure => present,
33 system => true,
34 }
35 user { 'boardvoting':
36 ensure => present,
37 comment => 'CAcert board voting system user',
38 system => true,
39 home => '/var/lib/boardvoting',
40 shell => '/bin/false',
41 require => Group['boardvoting'],
42 }
43 file { '/etc/boardvoting':
44 ensure => directory,
45 owner => 'root',
46 group => 'boardvoting',
47 mode => '0750',
48 require => Group['boardvoting'],
49 }
50 file { '/etc/boardvoting/ssl':
51 ensure => directory,
52 owner => 'root',
53 group => 'boardvoting',
54 mode => '0750',
55 require => Group['boardvoting'],
56 }
57 file { '/var/lib/boardvoting':
58 ensure => directory,
59 owner => 'boardvoting',
60 group => 'boardvoting',
61 mode => '0750',
62 require => User['boardvoting'],
63 }
64 package { 'lsb-base':
65 ensure => latest,
66 }
67 file { '/etc/init.d/boardvoting':
68 ensure => present,
69 owner => 'root',
70 group => 'root',
71 mode => '0755',
72 source => 'puppet:///modules/profiles/cacert_boardvoting/init.sh',
73 }
74 }