
With systemd systems it appears that ensure => running is insufficient to make sure the service is running. You also have to enable the service so that its unit is startable. Since we pretty much always want snmpd running just enable it. This behavior was noticed when git.openstack.org was rebuilt on CentOS 7 which uses systemd. Change-Id: I44f7f73abd5ecf12dad2522a7c48df50b12f7e9b
26 lines
510 B
Puppet
26 lines
510 B
Puppet
# == Class: snmpd
|
|
#
|
|
class snmpd {
|
|
|
|
include ::snmpd::params
|
|
|
|
package { 'snmpd':
|
|
ensure => present,
|
|
name => $::snmpd::params::package_name,
|
|
}
|
|
service { 'snmpd':
|
|
ensure => running,
|
|
enable => true,
|
|
hasrestart => true,
|
|
subscribe => File['/etc/snmp/snmpd.conf'],
|
|
}
|
|
file { '/etc/snmp/snmpd.conf':
|
|
ensure => present,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0444',
|
|
source => 'puppet:///modules/snmpd/snmpd.conf',
|
|
replace => true,
|
|
}
|
|
}
|