Browse Source

Ensure service reloads after configuration changes

Ensure init.d script uploaded after package instalation

Change-Id: I68a46fe3c2bc81700e6677c730334a4004bac291
Bartosz Kupidura 3 years ago
parent
commit
522bfcef03

+ 1
- 0
README.md View File

@@ -65,4 +65,5 @@ Contributors
65 65
 Dmitry Klenov <dklenov@mirantis.com> (PM)  
66 66
 Piotr Misiak <pmisiak@mirantis.com> (developer)  
67 67
 Szymon Bańka <sbanka@mirantis.com> (developer)  
68
+Bartosz Kupidura <bkupidura@mirantis.com> (developer) 
68 69
 Alexander Zatserklyany <azatserklyany@mirantis.com> (QA engineer)  

+ 3
- 1
deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/init.pp View File

@@ -18,6 +18,8 @@ class plugin_zabbix_snmptrapd {
18 18
   include plugin_zabbix_snmptrapd::params
19 19
 
20 20
   $service_name    = $plugin_zabbix_snmptrapd::params::service_name
21
+  $package_name    = $plugin_zabbix_snmptrapd::params::package_name
22
+
21 23
   $server_ip       = hiera('management_vip')
22 24
   $plugin_settings = hiera('zabbix_snmptrapd')
23 25
 
@@ -36,7 +38,7 @@ class plugin_zabbix_snmptrapd {
36 38
     group   => 'root',
37 39
     mode    => '0755',
38 40
     source  => "puppet:///modules/plugin_zabbix_snmptrapd/initscripts/${service_name}",
39
-    require => Class['snmp'],
41
+    require => Package[$package_name],
40 42
     notify  => Service[$service_name],
41 43
   }
42 44
 

+ 2
- 0
deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/params.pp View File

@@ -18,9 +18,11 @@ class plugin_zabbix_snmptrapd::params {
18 18
   case $::osfamily {
19 19
     'Debian': {
20 20
       $service_name = 'snmpd'
21
+      $package_name = 'snmpd'
21 22
     }
22 23
     'RedHat': {
23 24
       $service_name = 'snmptrapd'
25
+      $package_name = 'net-snmp'
24 26
     }
25 27
     default: {
26 28
       fail("unsuported osfamily ${::osfamily}, currently Debian and RedHat are the only supported platforms")

+ 4
- 3
deployment_scripts/puppet/modules/plugin_zabbix_snmptrapd/manifests/snmptt.pp View File

@@ -27,9 +27,10 @@ class plugin_zabbix_snmptrapd::snmptt {
27 27
   }
28 28
 
29 29
   service { 'snmptt':
30
-    ensure   => running,
31
-    enable   => true,
32
-    require  => Package['snmptt'],
30
+    ensure    => running,
31
+    enable    => true,
32
+    hasstatus => false,
33
+    require   => Package['snmptt'],
33 34
   }
34 35
 
35 36
   file { '/etc/snmp/snmptt.ini':

+ 1
- 1
metadata.yaml View File

@@ -14,7 +14,7 @@ licenses: ['Apache License, Version 2.0']
14 14
 # Homepage
15 15
 homepage: 'https://github.com/stackforge/fuel-plugin-zabbix-snmptrapd'
16 16
 # Authors
17
-authors: ['Dmitry Klenov <dklenov@mirantis.com>', 'Piotr Misiak <pmisiak@mirantis.com>', 'Szymon Banka <sbanka@mirantis.com>', 'Alexander Zatserklyany <azatserklyany@mirantis.com>']
17
+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>']
18 18
 
19 19
 # The plugin is compatible with releases in the list
20 20
 releases:

Loading…
Cancel
Save