fix proxy virtual checks for marathon and fx2

This commit is contained in:
Daniel Wallace 2018-04-30 10:05:57 -05:00
parent c160fe36ce
commit 99f9231759
No known key found for this signature in database
GPG key ID: 5FA5E5544F010D48
2 changed files with 4 additions and 8 deletions

View file

@ -24,11 +24,8 @@ GRAINS_CACHE = {}
def __virtual__():
try:
if salt.utils.platform.is_proxy() and __opts__['proxy']['proxytype'] == 'fx2':
return __virtualname__
except KeyError:
pass
if salt.utils.platform.is_proxy() and 'proxy' in __opts__ and __opts__['proxy'].get('proxytype') == 'fx2':
return __virtualname__
return False

View file

@ -14,10 +14,9 @@ __virtualname__ = 'marathon'
def __virtual__():
if not salt.utils.platform.is_proxy() or 'proxy' not in __opts__:
return False
else:
if salt.utils.platform.is_proxy() and 'proxy' in __opts__ and __opts__['proxy'].get('proxytype') == 'marathon':
return __virtualname__
return False
def kernel():