I have this doll module (monit) in which I declare the monit service enabled (aka starts when the machine boots)
class monit { $configdir = "/etc/monit.d" package { "monit": ensure => installed; } service { "monit": ensure => running, enable => true, require => Package["monit"], provider => init; } file { '/etc/monit.d': ensure => directory; '/etc/monit.conf': content => template('monit/monitrc.erb'), mode => 0600, group => root, require => File['/etc/monit.d'], before => Service[monit], notify => Service[monit], } }
Then I turned on with include monit by default node. However, when I apply this configuration, the puppet does not install monit as a launch service (use chkconfig -list monit, just displaying "off" and "off")
However, if I run puppet apply -e 'service { "monit": enable => true, } ' , then monit is added to run correctly.
Am I really doing something wrong? (Puppet 2.7.6)
The full configuration can be displayed at https://github.com/phuongnd08/Giasu-puppet
source share