Enable commenting of cronjobs if the system is not yet in production
If a system is not fully deployed, then these cronjobs will generate errors and a lot of email.
This commit is contained in:
parent
680e0b53e2
commit
814c343721
2 changed files with 10 additions and 3 deletions
|
@ -15,6 +15,7 @@ class rhizo_base {
|
||||||
$mail_admins = hiera('rhizo::mail_admins')
|
$mail_admins = hiera('rhizo::mail_admins')
|
||||||
$smsc_password = hiera('rhizo::smsc_password')
|
$smsc_password = hiera('rhizo::smsc_password')
|
||||||
$password_hash = hiera('rhizo::password_hash')
|
$password_hash = hiera('rhizo::password_hash')
|
||||||
|
$production = hiera('rhizo::production', 1)
|
||||||
|
|
||||||
# Configuration settings
|
# Configuration settings
|
||||||
$notouchcron = hiera('rhizo::notouchcron', 0)
|
$notouchcron = hiera('rhizo::notouchcron', 0)
|
||||||
|
@ -669,6 +670,12 @@ schedule { 'never':
|
||||||
content => template('rhizo_base/apcupsd.erb'),
|
content => template('rhizo_base/apcupsd.erb'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$comment = $production ? {
|
||||||
|
0 => '#',
|
||||||
|
1 => '',
|
||||||
|
default => ''
|
||||||
|
}
|
||||||
|
|
||||||
unless $notouchcron == 1 {
|
unless $notouchcron == 1 {
|
||||||
file { '/etc/cron.d/rhizomatica':
|
file { '/etc/cron.d/rhizomatica':
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
|
|
|
@ -17,9 +17,9 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn
|
||||||
0 3 * * * root /var/rhizomatica/bin/sms_cleanup.sh
|
0 3 * * * root /var/rhizomatica/bin/sms_cleanup.sh
|
||||||
|
|
||||||
#RRDtools graphs
|
#RRDtools graphs
|
||||||
*/5 * * * * root /var/rhizomatica/bin/platform_update_rrd.sh
|
<%= @comment -%>*/5 * * * * root /var/rhizomatica/bin/platform_update_rrd.sh
|
||||||
*/5 * * * * root /var/rhizomatica/bin/network_update_rrd.sh
|
<%= @comment -%>*/5 * * * * root /var/rhizomatica/bin/network_update_rrd.sh
|
||||||
*/1 * * * * root /var/rhizomatica/bin/network_update60.sh
|
<%= @comment -%>*/1 * * * * root /var/rhizomatica/bin/network_update60.sh
|
||||||
|
|
||||||
#Bind check between OpenBSC and Kannel (disabled)
|
#Bind check between OpenBSC and Kannel (disabled)
|
||||||
# */10 * * * * root /home/rhizomatica/bin/bind_check.sh
|
# */10 * * * * root /home/rhizomatica/bin/bind_check.sh
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue