@task
def drainrestart():
 check_min_healthy_instances(2)
 drain()
 stop()
 restart()
 undrain()

@ task def drainrestart ( ) : check_min_healthy_instances ( 2 ) drain ( ) stop ( ) restart ( ) undrain ( )
drain and restart nodes .