def __virtual__():
    if HAS_PWD and __grains__['kernel'] in ('FreeBSD', 'DragonFly'):
        return __virtualname__
    return (False, 'The pw_user execution module cannot be loaded: the pwd python module is not available or the system is not FreeBSD.')
Set the user module if the kernel is FreeBSD or DragonFly
dataset/ETHPy150Open saltstack/salt/salt/modules/pw_user.py/__virtual__