def set_(key, value, setting=None, conf_file=default_conf):
    '''
    Set a new value for a specific configuration line

    CLI Example:

    .. code-block:: bash

        salt '*' logrotate.set rotate 2

    Can also be used to set a single value inside a multiline configuration
    block. For instance, to change rotate in the following block:

    .. code-block:: text

        /var/log/wtmp {
            monthly
            create 0664 root root
            rotate 1
        }

    Use the following command:

    .. code-block:: bash

        salt '*' logrotate.set /var/log/wtmp rotate 2

    This module also has the ability to scan files inside an include directory,
    and make changes in the appropriate file.
    '''
    conf = _parse_conf(conf_file)
    for include in conf['include files']:
        if conf['include files'][include] in key:
            conf_file = os.path.join(conf['include'], include)

    if isinstance(conf[key], dict) and not setting:
        return (
            'Error: {0} includes a dict, and a specific setting inside the '
            'dict was not declared'.format(key)
        )

    if setting:
        if isinstance(conf[key], str):
            return ('Error: A setting for a dict was declared, but the '
                    'configuration line given is not a dict')
        # We're going to be rewriting an entire stanza
        stanza = conf[key]
        if value == 'False':
            del stanza[value]
        else:
            stanza[value] = setting
        new_line = _dict_to_stanza(key, stanza)
        log.debug(stanza)
        log.debug(new_line)
        log.debug(key)
        __salt__['file.replace'](conf_file,
                                 '{0}.*{{.*}}'.format(key),
                                 new_line,
                                 flags=24,
                                 backup=False)
    else:
        # This is the new config line that will be set
        if value == 'True':
            new_line = key
        elif value == 'False':
            new_line = ''
        else:
            new_line = '{0} {1}'.format(key, value)

        log.debug(conf_file)
        log.debug(key)
        log.debug(new_line)
        __salt__['file.replace'](conf_file,
                                 '^{0}.*'.format(key),
                                 new_line,
                                 flags=8,
                                 backup=False)
dataset/ETHPy150Open saltstack/salt/salt/modules/logrotate.py/set_/swapped operands of `in`