diff --git a/modules/rhizo_base/manifests/init.pp b/modules/rhizo_base/manifests/init.pp index ea1eec3..8c71d2c 100644 --- a/modules/rhizo_base/manifests/init.pp +++ b/modules/rhizo_base/manifests/init.pp @@ -15,6 +15,7 @@ class rhizo_base { $mail_admins = hiera('rhizo::mail_admins') $smsc_password = hiera('rhizo::smsc_password') $password_hash = hiera('rhizo::password_hash') + $production = hiera('rhizo::production', 1) # Configuration settings $notouchcron = hiera('rhizo::notouchcron', 0) @@ -669,6 +670,12 @@ schedule { 'never': content => template('rhizo_base/apcupsd.erb'), } + $comment = $production ? { + 0 => '#', + 1 => '', + default => '' + } + unless $notouchcron == 1 { file { '/etc/cron.d/rhizomatica': ensure => 'present', diff --git a/modules/rhizo_base/templates/rhizomatica.cron.erb b/modules/rhizo_base/templates/rhizomatica.cron.erb index 281babd..0297591 100644 --- a/modules/rhizo_base/templates/rhizomatica.cron.erb +++ b/modules/rhizo_base/templates/rhizomatica.cron.erb @@ -17,9 +17,9 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn 0 3 * * * root /var/rhizomatica/bin/sms_cleanup.sh #RRDtools graphs -*/5 * * * * root /var/rhizomatica/bin/platform_update_rrd.sh -*/5 * * * * root /var/rhizomatica/bin/network_update_rrd.sh -*/1 * * * * root /var/rhizomatica/bin/network_update60.sh +<%= @comment -%>*/5 * * * * root /var/rhizomatica/bin/platform_update_rrd.sh +<%= @comment -%>*/5 * * * * root /var/rhizomatica/bin/network_update_rrd.sh +<%= @comment -%>*/1 * * * * root /var/rhizomatica/bin/network_update60.sh #Bind check between OpenBSC and Kannel (disabled) # */10 * * * * root /home/rhizomatica/bin/bind_check.sh