def run_collect(): if host not in add_nodes: crm_script.exit_ok(host) rc, out, err = crm_script.service('pacemaker', 'is-active') if rc == 0 and out.strip() == 'active': crm_script.exit_fail("Pacemaker already running on %s" % (host)) crm_script.exit_ok(crm_init.info())
#!/usr/bin/env python import crm_script import crm_init try: crm_script.exit_ok(crm_init.info()) except Exception, e: crm_script.exit_fail(str(e))