def modules(syslog_ng_sbin_dir=None):
    '''
    Returns the available modules. If syslog_ng_sbin_dir is specified, it
    is added to the PATH during the execution of the command syslog-ng.

    CLI Example:

    .. code-block:: bash

        salt '*' syslog_ng.modules
        salt '*' syslog_ng.modules /home/user/install/syslog-ng/sbin
    '''
    try:
        ret = _run_command_in_extended_path(syslog_ng_sbin_dir,
                                            'syslog-ng',
                                            ('-V',))
    except CommandExecutionError as err:
        return _format_return_data(retcode=-1, stderr=six.text_type(err))

    if ret['retcode'] != 0:
        return _format_return_data(ret['retcode'],
                                   ret.get('stdout'),
                                   ret.get('stderr'))

    lines = ret['stdout'].split('\n')
    for line in lines:
        if line.startswith('Available-Modules'):
            label, installed_modules = line.split()
            return _format_return_data(ret['retcode'],
                                       stdout=installed_modules)
    return _format_return_data(-1, stderr='Unable to find the modules.')
Returns the available modules. If syslog_ng_sbin_dir is specified, it
    is added to the PATH during the execution of the command syslog-ng.

    CLI Example:

    .. code-block:: bash

        salt '*' syslog_ng.modules
        salt '*' syslog_ng.modules /home/user/install/syslog-ng/sbin