Skip to content

Instantly share code, notes, and snippets.

Created June 24, 2014 16:13
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/5fedd672066099a76a97 to your computer and use it in GitHub Desktop.
Save anonymous/5fedd672066099a76a97 to your computer and use it in GitHub Desktop.
import os
import salt.client
import salt.config
SALT_MINION_CONFIG = os.environ.get('SALT_MINION_CONFIG', '/etc/salt/minion')
opts = salt.config.minion_config(SALT_MINION_CONFIG)
opts['file_roots']['base'] = '/srv/salt'
opts['file_client'] = 'local'
caller = salt.client.Caller(mopts=opts)
caller.sminion.functions['state.sls']('db')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment