class gnuboat_canboat::service ( String $can_interface = "", String $actisense_primary = "", String $actisense_serial = "", Boolean $monitor = true, Enum['running', 'stopped'] $status = 'running', Boolean $enabled = true, ) inherits gnuboat_canboat { service{'n2kd_monitor': ensure => $status, enable => $enabled, subscribe => Package['n2kd-scripts', 'n2kd-bin'], } # file{'/etc/systemd/system': # ensure => 'directory', # owner => 'root', # group => 'root', # mode => '0750', # } file{'/etc/default/n2kd': ensure => present, owner => 'root', group => 'root', mode => '0600', notify => Service['n2kd_monitor'], content => epp('gnuboat_canboat/n2kd.epp', { 'can_interface' => $can_interface, 'actisense_primary' => $actisense_primary, 'monitor' => $monitor, }), } if $actisense_serial != '' { file{'/etc/udev/rules.d/99-n2kd-actisense.rules': ensure => present, owner => 'root', group => 'root', mode => '0600', notify => Service['n2kd_monitor'], content => epp('gnuboat_canboat/actisense-udev.epp', { 'actisense_primary' => $actisense_primary, 'actisense_serial' => $actisense_serial, }), } } }