Browse Source

Purge tmp directory

Change-Id: I104d243c453c6aaea91a88f300dd19ce7f369d10
Closes-Bug: 1714454
Oleksiy Molchanov 1 year ago
parent
commit
f4a5980e98

+ 9
- 1
deployment_scripts/puppet/modules/plugin_zabbix/manifests/db/mysql.pp View File

@@ -62,11 +62,19 @@ class plugin_zabbix::db::mysql(
62 62
     require     => File['/tmp/zabbix/data_clean.sql'],
63 63
   }
64 64
 
65
-  exec{ "${plugin_zabbix::params::db_name}-import":
65
+  exec { "${plugin_zabbix::params::db_name}-import":
66 66
     command     => "/usr/bin/mysql ${mysql_extras_args} ${plugin_zabbix::params::db_name} < /tmp/zabbix/schema.sql",
67 67
     logoutput   => true,
68 68
     refreshonly => true,
69 69
     subscribe   => $next_require,
70 70
     require     => Exec['prepare-schema-2'],
71 71
   }
72
+
73
+  exec { 'purge-tmp-dir':
74
+    command     => 'rm -rf /tmp/zabbix',
75
+    path        => ['/usr/sbin', '/usr/bin', '/sbin', '/bin'],
76
+    logoutput   => true,
77
+    refreshonly => true,
78
+    subscribe   => Exec["${plugin_zabbix::params::db_name}-import"],
79
+  }
72 80
 }

Loading…
Cancel
Save