Ensure service reloads after configuration changes
Ensure init.d script uploaded after package instalation Change-Id: I68a46fe3c2bc81700e6677c730334a4004bac291
This commit is contained in:
parent
377a6c27c4
commit
522bfcef03
|
@ -65,4 +65,5 @@ Contributors
|
||||||
Dmitry Klenov <dklenov@mirantis.com> (PM)
|
Dmitry Klenov <dklenov@mirantis.com> (PM)
|
||||||
Piotr Misiak <pmisiak@mirantis.com> (developer)
|
Piotr Misiak <pmisiak@mirantis.com> (developer)
|
||||||
Szymon Bańka <sbanka@mirantis.com> (developer)
|
Szymon Bańka <sbanka@mirantis.com> (developer)
|
||||||
|
Bartosz Kupidura <bkupidura@mirantis.com> (developer)
|
||||||
Alexander Zatserklyany <azatserklyany@mirantis.com> (QA engineer)
|
Alexander Zatserklyany <azatserklyany@mirantis.com> (QA engineer)
|
||||||
|
|
|
@ -18,6 +18,8 @@ class plugin_zabbix_snmptrapd {
|
||||||
include plugin_zabbix_snmptrapd::params
|
include plugin_zabbix_snmptrapd::params
|
||||||
|
|
||||||
$service_name = $plugin_zabbix_snmptrapd::params::service_name
|
$service_name = $plugin_zabbix_snmptrapd::params::service_name
|
||||||
|
$package_name = $plugin_zabbix_snmptrapd::params::package_name
|
||||||
|
|
||||||
$server_ip = hiera('management_vip')
|
$server_ip = hiera('management_vip')
|
||||||
$plugin_settings = hiera('zabbix_snmptrapd')
|
$plugin_settings = hiera('zabbix_snmptrapd')
|
||||||
|
|
||||||
|
@ -36,7 +38,7 @@ class plugin_zabbix_snmptrapd {
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0755',
|
mode => '0755',
|
||||||
source => "puppet:///modules/plugin_zabbix_snmptrapd/initscripts/${service_name}",
|
source => "puppet:///modules/plugin_zabbix_snmptrapd/initscripts/${service_name}",
|
||||||
require => Class['snmp'],
|
require => Package[$package_name],
|
||||||
notify => Service[$service_name],
|
notify => Service[$service_name],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,11 @@ class plugin_zabbix_snmptrapd::params {
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'Debian': {
|
'Debian': {
|
||||||
$service_name = 'snmpd'
|
$service_name = 'snmpd'
|
||||||
|
$package_name = 'snmpd'
|
||||||
}
|
}
|
||||||
'RedHat': {
|
'RedHat': {
|
||||||
$service_name = 'snmptrapd'
|
$service_name = 'snmptrapd'
|
||||||
|
$package_name = 'net-snmp'
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
fail("unsuported osfamily ${::osfamily}, currently Debian and RedHat are the only supported platforms")
|
fail("unsuported osfamily ${::osfamily}, currently Debian and RedHat are the only supported platforms")
|
||||||
|
|
|
@ -27,9 +27,10 @@ class plugin_zabbix_snmptrapd::snmptt {
|
||||||
}
|
}
|
||||||
|
|
||||||
service { 'snmptt':
|
service { 'snmptt':
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
enable => true,
|
||||||
require => Package['snmptt'],
|
hasstatus => false,
|
||||||
|
require => Package['snmptt'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/snmp/snmptt.ini':
|
file { '/etc/snmp/snmptt.ini':
|
||||||
|
|
|
@ -14,7 +14,7 @@ licenses: ['Apache License, Version 2.0']
|
||||||
# Homepage
|
# Homepage
|
||||||
homepage: 'https://github.com/stackforge/fuel-plugin-zabbix-snmptrapd'
|
homepage: 'https://github.com/stackforge/fuel-plugin-zabbix-snmptrapd'
|
||||||
# Authors
|
# Authors
|
||||||
authors: ['Dmitry Klenov <dklenov@mirantis.com>', 'Piotr Misiak <pmisiak@mirantis.com>', 'Szymon Banka <sbanka@mirantis.com>', 'Alexander Zatserklyany <azatserklyany@mirantis.com>']
|
authors: ['Dmitry Klenov <dklenov@mirantis.com>', 'Piotr Misiak <pmisiak@mirantis.com>', 'Szymon Banka <sbanka@mirantis.com>', 'Bartosz Kupidura <bkupidura@mirantis.com>', 'Alexander Zatserklyany <azatserklyany@mirantis.com>']
|
||||||
|
|
||||||
# The plugin is compatible with releases in the list
|
# The plugin is compatible with releases in the list
|
||||||
releases:
|
releases:
|
||||||
|
|
Loading…
Reference in New Issue