-
-
Save anonymous/5fedd672066099a76a97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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