summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksiy Molchanov <omolchanov@mirantis.com>2017-09-28 14:33:40 +0300
committerOlivier Bourdon <obourdon@mirantis.com>2017-10-02 11:25:00 +0200
commitf4a5980e98a89041769406a06ec84c57ce0875f2 (patch)
treef832dd519cbf9c7861dd8f9001bc3710a97c8f9b
parent48b2fb5eac9b88291a9c6a5f45481a2303b1e24f (diff)
Purge tmp directoryHEADmaster
Notes
Notes (review): Code-Review+2: Olivier Bourdon <obourdon@mirantis.com> Workflow+1: Olivier Bourdon <obourdon@mirantis.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 02 Oct 2017 11:46:08 +0000 Reviewed-on: https://review.openstack.org/508123 Project: openstack/fuel-plugin-external-zabbix Branch: refs/heads/master
-rw-r--r--deployment_scripts/puppet/modules/plugin_zabbix/manifests/db/mysql.pp10
1 files changed, 9 insertions, 1 deletions
diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/db/mysql.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/db/mysql.pp
index 3e23c98..766d697 100644
--- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/db/mysql.pp
+++ b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/db/mysql.pp
@@ -62,11 +62,19 @@ class plugin_zabbix::db::mysql(
62 require => File['/tmp/zabbix/data_clean.sql'], 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 command => "/usr/bin/mysql ${mysql_extras_args} ${plugin_zabbix::params::db_name} < /tmp/zabbix/schema.sql", 66 command => "/usr/bin/mysql ${mysql_extras_args} ${plugin_zabbix::params::db_name} < /tmp/zabbix/schema.sql",
67 logoutput => true, 67 logoutput => true,
68 refreshonly => true, 68 refreshonly => true,
69 subscribe => $next_require, 69 subscribe => $next_require,
70 require => Exec['prepare-schema-2'], 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}