mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #47401 from gtmanfred/proxy
fix proxy virtual checks for marathon and fx2
This commit is contained in:
commit
3bb00cbb55
2 changed files with 4 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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():
|
||||
|
|
Loading…
Add table
Reference in a new issue