From 9ec0ef766c210ac6ca26a725701a89031a56fbab Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Thu, 10 Dec 2009 14:52:50 -0500 Subject: make backup and optimize cron jobs optional; introduce $mysql_backup_cron, $mysql_backup_dir and$mysql_optimize_cron; use a module_dir for scripts --- manifests/server/cron/optimize.pp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 manifests/server/cron/optimize.pp (limited to 'manifests/server/cron/optimize.pp') diff --git a/manifests/server/cron/optimize.pp b/manifests/server/cron/optimize.pp new file mode 100644 index 0000000..29ee66e --- /dev/null +++ b/manifests/server/cron/optimize.pp @@ -0,0 +1,18 @@ +class mysql::server::cron::optimize { + + file { 'mysql_optimize_script': + path => "${mysql_moduledir}/server/optimize_tables.rb", + source => "puppet://${server}/modules/mysql/scripts/optimize_tables.rb", + owner => root, group => 0, mode => 0700; + } + + cron { 'mysql_optimize_cron': + command => "${mysql_moduledir}/server/optimize_tables.rb", + user => 'root', + minute => 40, + hour => 6, + weekday => 7, + require => [ Exec['mysql_set_rootpw'], File['mysql_root_cnf'], File['mysql_optimize_script'] ], + } + +} -- cgit v1.2.3