mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
More virtual return fixes
This commit is contained in:
parent
da0276ca4d
commit
8f98c8cfb8
@ -23,7 +23,7 @@ def __virtual__():
|
||||
if salt.utils.which('hponcfg'):
|
||||
return True
|
||||
|
||||
return False
|
||||
return (False, 'ilo execution module not loaded: the hponcfg binary is not in the path.')
|
||||
|
||||
|
||||
def __execute_cmd(name, xml):
|
||||
|
@ -46,7 +46,7 @@ def __virtual__():
|
||||
'''
|
||||
if HAS_INFLUXDB:
|
||||
return __virtualname__
|
||||
return False
|
||||
return (False, 'The influx execution module cannot be loaded: influxdb library not available.')
|
||||
|
||||
|
||||
def _client(user=None, password=None, host=None, port=None):
|
||||
|
@ -109,7 +109,7 @@ def __virtual__():
|
||||
'''
|
||||
if salt.utils.which('ipset'):
|
||||
return True
|
||||
return False
|
||||
return (False, 'The ipset execution modules cannot be loaded: ipset binary not in path.')
|
||||
|
||||
|
||||
def _ipset_cmd():
|
||||
|
@ -25,7 +25,7 @@ def __virtual__():
|
||||
Only load the module if iptables is installed
|
||||
'''
|
||||
if not salt.utils.which('iptables'):
|
||||
return False
|
||||
return (False, 'The iptables execution module cannot be loaded: iptables not installed.')
|
||||
|
||||
return True
|
||||
|
||||
|
@ -34,7 +34,7 @@ def __virtual__():
|
||||
if salt.utils.which('kadmin'):
|
||||
return True
|
||||
|
||||
return False
|
||||
return (False, 'The kerberos execution module not loaded: kadmin not in path')
|
||||
|
||||
|
||||
def __execute_kadmin(cmd):
|
||||
|
@ -21,7 +21,8 @@ def __virtual__():
|
||||
if salt.utils.which('localectl') \
|
||||
or __grains__['os_family'] in ('Redhat', 'Debian', 'Gentoo'):
|
||||
return True
|
||||
return False
|
||||
return (False, 'The keyboard exeuction module cannot be loaded: '
|
||||
'only works on Redhat, Debian or Gentoo systems or if localectl binary in path.')
|
||||
|
||||
|
||||
def get_sys():
|
||||
|
Loading…
Reference in New Issue
Block a user