def delete(name, force=False):
    '''
    Delete nictag

    name : string
        nictag to delete
    force : boolean
        force delete even if vms attached

    CLI Example:

    .. code-block:: bash

        salt '*' nictagadm.exists admin
    '''
    ret = {}
    nictagadm = _check_nictagadm()

    if list_nictags() not in name:
        return True

    cmd = '{nictagadm} delete {force}{name}'.format(
        nictagadm=nictagadm,
        force="-f " if force else "",
        name=name
    )
    res = __salt__['cmd.run_all'](cmd)

    if res['retcode'] == 0:
        return True
    else:
        return {'Error': 'failed to delete nictag.' if 'stderr' not in res and res['stderr'] == '' else res['stderr']}

# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
dataset/ETHPy150Open saltstack/salt/salt/modules/smartos_nictagadm.py/delete/swapped operands of `not in`