docs: def run_play(play_source, inventory_path=None, roles=None,
               extra_vars=None, on_error_continue=False):
      """Run a play.
  
      Args:
          pattern_hosts (str): pattern to describe ansible hosts to target.
              see https://docs.ansible.com/ansible/latest/intro_patterns.html
          play_source (dict): ansible task
          inventory_path (str): inventory to use
          extra_vars (dict): extra_vars to use
          on_error_continue(bool): Don't throw any exception in case a host is
              unreachable or the playbooks run with errors
  
      Raises:
          :py:class:`enoslib.errors.EnosFailedHostsError`: if a task returns an
              error on a host and ``on_error_continue==False``
          :py:class:`enoslib.errors.EnosUnreachableHostsError`: if a host is
              unreachable (through ssh) and ``on_error_continue==False``
  
      Returns:
          List of all the results
      """
      # NOTE(msimonin): inventory could be infered from a host list (maybe)
      results = []
      inventory, variable_manager, loader, options = _load_defaults(
          inventory_path=inventory_path,
          roles=roles,
          extra_vars=extra_vars)
      callback = _MyCallback(results)
      passwords = {}
      tqm = task_queue_manager.TaskQueueManager(
          inventory=inventory,
          variable_manager=variable_manager,
          loader=loader,
          options=options,
          passwords=passwords,
          stdout_callback=callback)
  
      # create play
      play_inst = play.Play().load(play_source,
                                   variable_manager=variable_manager,
                                   loader=loader)
  
      # actually run it
      try:
          tqm.run(play_inst)
      finally:
          tqm.cleanup()
  
      # Handling errors
      failed_hosts = []
      unreachable_hosts = []
      for r in results:
          if r.status == STATUS_UNREACHABLE:
              unreachable_hosts.append(r)
          if r.status == STATUS_FAILED:
              failed_hosts.append(r)
  
      if len(failed_hosts) > 0:
          logger.error("Failed hosts: %s" % failed_hosts)
          if not on_error_continue:
              raise EnosFailedHostsError(failed_hosts)
      if len(unreachable_hosts) > 0:
          logger.error("Unreachable hosts: %s" % unreachable_hosts)
          if not on_error_continue:
              raise EnosUnreachableHostsError(unreachable_hosts)
  
      return results