source: src/puppetcode/environments/test/modules/gnuboat_canboat/manifests/service.pp@ c75e30b

0.5 app-cordova debian/bullseye debian/jessie
Last change on this file since c75e30b was 5209541, checked in by Joachim Langenbach <joachim.langenbach@…>, 10 years ago

First gnuboat_canboat module version

  • Property mode set to 100644
File size: 1.5 KB
Line 
1class gnuboat_canboat::service
2(
3 String $actisense_primary = "",
4 String $actisense_serial = "",
5 Boolean $monitor = true,
6 Enum['running', 'stopped'] $status = 'running',
7 Boolean $enabled = true,
8)
9inherits gnuboat_canboat
10{
11 service{'n2kd_monitor':
12 ensure => $status,
13 enable => $enabled,
14 subscribe => Package['n2kd-scripts', 'n2kd-bin'],
15 }
16
17
18# file{'/etc/systemd/system':
19# ensure => 'directory',
20# owner => 'root',
21# group => 'root',
22# mode => '0750',
23# }
24
25 file{'/etc/default/n2kd':
26 ensure => present,
27 owner => 'root',
28 group => 'root',
29 mode => '0600',
30 notify => Service['n2kd_monitor'],
31 content => epp('gnuboat_canboat/n2kd.epp',
32 {
33 'actisense_primary' => $actisense_primary,
34 'monitor' => $monitor,
35 }),
36 }
37
38 file{'/etc/systemd/system/n2kd_monitor.service':
39 ensure => present,
40 owner => 'root',
41 group => 'root',
42 mode => '0600',
43 notify => Service['n2kd_monitor'],
44 source => 'puppet:///modules/gnuboat_canboat/n2kd_monitor.service',
45 }
46
47 if $actisense_serial != '' {
48 file{'/etc/udev/rules.d/99-n2kd-actisense.rules':
49 ensure => present,
50 owner => 'root',
51 group => 'root',
52 mode => '0600',
53 notify => Service['n2kd_monitor'],
54 content => epp('gnuboat_canboat/actisense-udev.epp',
55 {
56 'actisense_primary' => $actisense_primary,
57 'actisense_serial' => $actisense_serial,
58 }),
59 }
60 }
61
62}
Note: See TracBrowser for help on using the repository browser.