Check for existence of 'virtual' in __grains__ first.

This was breaking the minion on Windows.
This commit is contained in:
David Boucha 2012-03-16 09:49:13 -06:00
parent 0ed1253036
commit f8edc920bc

View File

@ -42,6 +42,8 @@ def __virtual__():
''' '''
Apply this module as the hyper module if the minion is a kvm hypervisor Apply this module as the hyper module if the minion is a kvm hypervisor
''' '''
if 'virtual' not in __grains__:
return False
if __grains__['virtual'] != 'physical': if __grains__['virtual'] != 'physical':
return False return False
if 'kvm_' not in open('/proc/modules').read(): if 'kvm_' not in open('/proc/modules').read():