def unwrap_bolt_result(target, result)
      if result.error_hash
        # something went wrong return the failure
        return result
      end

      Bolt::Result.for_command(target, result.value['stdout'], result.value['stderr'], result.value['exit_code'])
    end
def unwrap_bolt_result(target, result)
      if result.error_hash
        # something went wrong return the failure
        return result
      end

      Bolt::Result.for_command(target, result.value['stdout'], result.value['stderr'], result.value['exit_code'])
    end
run_task generates a result that makes sense for a generic task which
 needs to be unwrapped to extract stdout/stderr/exitcode.