'Run list of commands on remote device and return results'

def run_commands(self, commands, check_rc=True):

    responses = list()
    for item in to_list(commands):
        cmd = item['command']
        (rc, out, err) = self.exec_command(cmd)
        if (check_rc and (rc != 0)):
            self._module.fail_json(msg=cli_err_msg(cmd.strip(), err))
        try:
            out = self._module.from_json(out)
        except ValueError:
            out = str(out).strip()
        responses.append(out)
    return responses
