def __virtual__():
    if not salt.utils.which('chef-client'):
        return (False, 'Cannot load chef module: chef-client not found')
    return True
Only load if chef is installed
dataset/ETHPy150Open saltstack/salt/salt/modules/chef.py/__virtual__