Skip to content

Instantly share code, notes, and snippets.

Created March 3, 2015 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/18f7839c400bd5379198 to your computer and use it in GitHub Desktop.
Save anonymous/18f7839c400bd5379198 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import salt.exceptions
import salt.config
import salt.loader
def status(name='soae'):
__opts__ = salt.config.minion_config('/etc/salt/minion')
__salt__ = salt.loader.minion_mods(__opts__)
__grains__ = salt.loader.grains(__opts__)
__opts__['grains'] = __grains__
state = __salt__['service.status'](name)
return state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment