Allow status beacon to run on all operating systems

This commit is contained in:
Mike Place 2017-04-13 10:32:25 -06:00
parent 6df76f6687
commit ecbb0d186f
No known key found for this signature in database
GPG key ID: 9136F4F13705CFD3

View file

@ -81,6 +81,12 @@ markers for specific list items:
- 0
- 1
- 2
.. warning::
Not all status functions are supported for every operating system. Be certain
to check the minion log for errors after configuring this beacon.
'''
# Import python libs
@ -91,6 +97,8 @@ import salt.exceptions
log = logging.getLogger(__name__)
__virtualname__ = 'status'
def __validate__(config):
'''
@ -102,11 +110,7 @@ def __validate__(config):
def __virtual__():
# TODO Find a way to check the existence of the module itself, not just a single func
if 'status.w' not in __salt__:
return (False, 'The \'status\' execution module is not available on this system')
else:
return True
return __virtualname__
def beacon(config):