secours: màj (plus de komaz, ni gordon)

This commit is contained in:
Daniel STAN 2014-09-27 22:22:54 +02:00
parent 390d500235
commit f023c5b0f5

View file

@ -41,16 +41,13 @@ FICHIERS = {
'charybde': { 'charybde': {
'/etc/bind/named.conf.options': '//' , '/etc/bind/named.conf.options': '//' ,
}, },
'gordon': {
'/etc/bind/named.conf.options': '//' ,
},
'nem': { 'nem': {
'/etc/bind/named.conf.options': '//' , '/etc/bind/named.conf.options': '//' ,
}, },
'zamok': { 'zamok': {
'/etc/postfix/main.cf': '#', '/etc/postfix/main.cf': '#',
}, },
'komaz': { 'odlyd': {
'/proc/net/nf_condition/secours': '0', '/proc/net/nf_condition/secours': '0',
} }
}.get(HOSTNAME, {}) }.get(HOSTNAME, {})
@ -66,18 +63,14 @@ COMMANDES = {
'charybde': [ 'charybde': [
'/etc/init.d/bind9 reload', '/etc/init.d/bind9 reload',
], ],
'gordon': [
'/etc/init.d/bind9 reload',
],
'nem': [ 'nem': [
'/etc/init.d/bind9 reload', '/etc/init.d/bind9 reload',
], ],
'zamok': [ 'zamok': [
'/etc/init.d/postfix restart', '/etc/init.d/postfix restart',
], ],
'komaz': [ 'odlyd': [
'/etc/init.d/aiccu restart', '/etc/init.d/aiccu restart',
'/usr/bin/monit monitor netacct-crans-sixxs2',
], ],
}.get(HOSTNAME, []) }.get(HOSTNAME, [])
@ -148,7 +141,7 @@ def rewrite_config(fichier, comment, etat):
lignes terminant par "#POUR SECOURS", ou les n lignes suivant une lignes terminant par "#POUR SECOURS", ou les n lignes suivant une
ligne commençant par "#POUR SECOURS-n" (si le -n est omis, une ligne commençant par "#POUR SECOURS-n" (si le -n est omis, une
seule ligne est affectée)""" seule ligne est affectée)"""
if HOSTNAME=='komaz': if HOSTNAME=='odlyd':
if etat=='secours': if etat=='secours':
clobber(fichier,'1') clobber(fichier,'1')
elif etat=='normal': elif etat=='normal':
@ -280,7 +273,7 @@ def main():
print "Mode %s" % mode_m_apres print "Mode %s" % mode_m_apres
if HOSTNAME == 'komaz': if HOSTNAME == 'odlyd':
fichier, commentaire = FICHIERS.items()[0] fichier, commentaire = FICHIERS.items()[0]
try: try:
rewrite_config(fichier, commentaire, etat_h_apres) rewrite_config(fichier, commentaire, etat_h_apres)