code: def exit_success(jid, ext_source=None):
      '''
      Check if a job has been executed and exit successfully
  
      jid
          The jid to look up.
      ext_source
          The external job cache to use. Default: `None`.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt-run jobs.exit_success 20160520145827701627
      '''
      ret = dict()
  
      data = list_job(
          jid,
          ext_source=ext_source
      )
  
      minions = data.get('Minions', [])
      result = data.get('Result', {})
  
      for minion in minions:
          if minion in result and 'return' in result[minion]:
              ret[minion] = True if result[minion]['return'] else False
          else:
              ret[minion] = False
  
      for minion in result:
          if 'return' in result[minion] and result[minion]['return']:
              ret[minion] = True
      return ref exit_success(jid, ext_source=None):
      '''
      Check if a job has been executed and exit successfully
  
      jid
          The jid to look up.
      ext_source
          The external job cache to use. Default: `None`.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt-run jobs.exit_success 20160520145827701627
      '''
      ret = dict()
  
      data = list_job(
          jid,
          ext_source=ext_source
      )
  
      minions = data.get('Minions', [])
      result = data.get('Result', {})
  
      for minion in minions:
          if minion in result and 'return' in result[minion]:
              ret[minion] = True if result[minion]['return'] else False
          else:
              ret[minion] = False
  
      for minion in result:
          if 'return' in result[minion] and result[minion]['return']:
              ret[minion] = True
      return ret
docs: Check if a job has been executed and exit successfully
  
      jid
          The jid to look up.
      ext_source
          The external job cache to use. Default: `None`.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt-run jobs.exit_success 20160520145827701627