salt.runners.salt

New in version Carbon.

This runner makes Salt's execution modules available on the salt master.

Salt's execution modules are normally available on the salt minion. Use this runner to call execution modules on the salt master. Salt execution modules are the functions called by the salt command.

Execution modules can be called with salt-run:

salt-run salt.cmd test.ping
# call functions with arguments and keyword arguments
salt-run salt.cmd test.arg 1 2 3 key=value a=1

Execution modules are also available to salt runners:

__salt__['salt.cmd'](fun=fun, args=args, kwargs=kwargs)
salt.runners.salt.cmd(fun, *args, **kwargs)

Execute fun with the given args and kwargs. Parameter fun should be the string name of the execution module to call.

Note that execution modules will be loaded every time this function is called.

CLI example:

salt-run salt.cmd test.ping
# call functions with arguments and keyword arguments
salt-run salt.cmd test.arg 1 2 3 a=1