diff --git a/salt/modules/freebsd_sysctl.py b/salt/modules/freebsd_sysctl.py index 1e9e91d56a..55fccd37d8 100644 --- a/salt/modules/freebsd_sysctl.py +++ b/salt/modules/freebsd_sysctl.py @@ -14,9 +14,12 @@ __virtualname__ = 'sysctl' def __virtual__(): ''' - Only run on FreeBSD systems + Only runs on FreeBSD systems ''' - return __virtualname__ if __grains__['os'] == 'FreeBSD' else False + if __grains__['os'] == 'FreeBSD': + return __virtualname__ + return (False, 'The freebsd_sysctl execution module cannot be loaded: ' + 'only available on FreeBSD systems.') def _formatfor(name, value, config, tail=''):