Run the inline script commands, one by one
    :**kwargs: catch all other things we may get but don't actually need/use

def run_inline_script(host,
                      name=None,
                      port=22,
                      timeout=900,
                      username='root',
                      key_filename=None,
                      inline_script=None,
                      ssh_timeout=15,
                      display_ssh_output=True,
                      parallel=False,
                      sudo_password=None,
                      sudo=False,
                      password=None,
                      tty=None,
                      opts=None,
                      tmp_dir='/tmp/.saltcloud-inline_script',
                      **kwargs):
    '''
    Run the inline script commands, one by one
    :**kwargs: catch all other things we may get but don't actually need/use
    '''

    gateway = None
    if 'gateway' in kwargs:
        gateway = kwargs['gateway']

    starttime = time.mktime(time.localtime())
    log.debug('Deploying %s at %s', host, starttime)

    known_hosts_file = kwargs.get('known_hosts_file', '/dev/null')

    if wait_for_port(host=host, port=port, gateway=gateway):
        log.debug('SSH port %s on %s is available', port, host)
        newtimeout = timeout - (time.mktime(time.localtime()) - starttime)
        if wait_for_passwd(host, port=port, username=username,
                           password=password, key_filename=key_filename,
                           ssh_timeout=ssh_timeout,
                           display_ssh_output=display_ssh_output,
                           gateway=gateway, known_hosts_file=known_hosts_file):

            log.debug('Logging into %s:%s as %s', host, port, username)
            newtimeout = timeout - (time.mktime(time.localtime()) - starttime)
            ssh_kwargs = {
                'hostname': host,
                'port': port,
                'username': username,
                'timeout': ssh_timeout,
                'display_ssh_output': display_ssh_output,
                'sudo_password': sudo_password,
                'sftp': opts.get('use_sftp', False)
            }
            ssh_kwargs.update(__ssh_gateway_config_dict(gateway))
            if key_filename:
                log.debug('Using %s as the key_filename', key_filename)
                ssh_kwargs['key_filename'] = key_filename
            elif password and 'has_ssh_agent' in kwargs and kwargs['has_ssh_agent'] is False:
                ssh_kwargs['password'] = password

            # TODO: write some tests ???
            # TODO: check edge cases (e.g. ssh gateways, salt deploy disabled, etc.)
            if root_cmd('test -e \\"{0}\\"'.format(tmp_dir), tty, sudo,
                        allow_failure=True, **ssh_kwargs) and inline_script:
                log.debug('Found inline script to execute.')
                for cmd_line in inline_script:
                    log.info('Executing inline command: %s', cmd_line)
                    ret = root_cmd('sh -c "( {0} )"'.format(cmd_line),
                                   tty, sudo, allow_failure=True, **ssh_kwargs)
                    if ret:
                        log.info('[%s] Output: %s', cmd_line, ret)

    # TODO: ensure we send the correct return value
    return True