More virtual return fixes

This commit is contained in:
Tim Baker 2015-12-09 04:03:05 +10:00
parent da0276ca4d
commit 8f98c8cfb8
6 changed files with 7 additions and 6 deletions

View File

@ -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):

View File

@ -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):

View File

@ -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():

View File

@ -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

View File

@ -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):

View File

@ -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():