mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00

Fixes #438 This also sets a default "level" argument to setup_console_logger() to error which it already does when the level isn't in the dict.
23 lines
431 B
Python
Executable file
23 lines
431 B
Python
Executable file
#!/usr/bin/env python2
|
|
'''
|
|
Directly call a salt command in the modules, does not require a running salt
|
|
minion to run.
|
|
'''
|
|
|
|
import salt.cli
|
|
import salt.log
|
|
salt.log.setup_console_logger()
|
|
|
|
|
|
def main():
|
|
'''
|
|
The main function
|
|
'''
|
|
client = salt.cli.SaltCall()
|
|
client.run()
|
|
|
|
if __name__ == '__main__':
|
|
try:
|
|
main()
|
|
except KeyboardInterrupt:
|
|
raise SystemExit('\nExiting gracefully on Ctrl-c')
|