def __virtual__():
    # Enable on these platforms only.
    enable = set((
        'XenServer',
        'RedHat',
        'CentOS',
        'ScientificLinux',
        'CloudLinux',
        'Amazon',
        'Fedora',
        'ALT',
        'OEL',
        'SUSE  Enterprise Server',
        'SUSE',
        'McAfee  OS Server'
    ))
    if __grains__['os'] in enable:
        if __grains__['os'] == 'XenServer':
            return __virtualname__

        if __grains__['os'] == 'SUSE':
            if str(__grains__['osrelease']).startswith('11'):
                return __virtualname__
            else:
                return (False, 'Cannot load rh_service module on SUSE > 11')

        osrelease_major = __grains__.get('osrelease_info', [0])[0]

        if __grains__['os'] == 'Fedora':
            if osrelease_major >= 15:
                return (
                    False,
                    'Fedora >= 15 uses systemd, will not load rh_service.py '
                    'as virtual \'service\''
                )
        if __grains__['os'] in ('RedHat', 'CentOS', 'ScientificLinux', 'OEL', 'CloudLinux'):
            if osrelease_major >= 7:
                return (
                    False,
                    'RedHat-based distros >= version 7 use systemd, will not '
                    'load rh_service.py as virtual \'service\''
                )
        return __virtualname__
    return (False, 'Cannot load rh_service module: OS not in {0}'.format(enable))
Only work on select distros which still use Red Hat's /usr/bin/service for
dataset/ETHPy150Open saltstack/salt/salt/modules/rh_service.py/__virtual__