def __virtual__():
    '''
    Confine this module to rpm based systems
    '''
    if not salt.utils.path.which('rpm'):
        return (False, 'The rpm execution module failed to load: rpm binary is not in the path.')
    try:
        os_grain = __grains__['os'].lower()
        os_family = __grains__['os_family'].lower()
    except Exception:
        return (False, 'The rpm execution module failed to load: failed to detect os or os_family grains.')

    enabled = ('amazon', 'xcp', 'xenserver', 'VirtuozzoLinux')

    if os_family in ['redhat', 'suse'] or os_grain in enabled:
        return __virtualname__
    return (False, 'The rpm execution module failed to load: only available on redhat/suse type systems '
        'or amazon, xcp or xenserver.')
def __virtual__ ( ) : if not salt . utils . path . which ( 'rpm' ) : return ( False , 'The rpm execution module failed to load: rpm binary is not in the path.' ) try : os_grain = __grains__ [ 'os' ] . lower ( ) os_family = __grains__ [ 'os_family' ] . lower ( ) except Exception : return ( False , 'The rpm execution module failed to load: failed to detect os or os_family grains.' ) enabled = ( 'amazon' , 'xcp' , 'xenserver' , 'VirtuozzoLinux' ) if os_family in [ 'redhat' , 'suse' ] or os_grain in enabled : return __virtualname__ return ( False , 'The rpm execution module failed to load: only available on redhat/suse type systems ' 'or amazon, xcp or xenserver.' )
Confine this module to rpm based systems