def set_node_schedulability(facts):
 if ('node' in facts):
  if ('schedulable' not in facts['node']):
   if ('master' in facts):
    facts['node']['schedulable'] = False
   else:
    facts['node']['schedulable'] = True
 return facts

def set_node_schedulability ( facts ) : if ( 'node' in facts ) : if ( 'schedulable' not in facts [ 'node' ] ) : if ( 'master' in facts ) : facts [ 'node' ] [ 'schedulable' ] = False else : facts [ 'node' ] [ 'schedulable' ] = True return facts
set schedulable facts if not already present in facts dict args: facts : existing facts returns: dict: the facts dict updated with the generated schedulable facts if they were not already present .