def generate_salt_cmd(target, module, args=None, kwargs=None):
args = args or []<EOL>kwargs = kwargs or {}<EOL>target = target or '<STR_LIT:*>'<EOL>target = '<STR_LIT>' % target<EOL>cmd = [target, module]<EOL>for arg in args:<EOL><INDENT>cmd.append(arg)<EOL><DEDENT>for key in kwargs:<EOL><INDENT>cmd.append('<STR_LIT>'.format(key, kwargs[key]))<EOL><DEDENT>return cmd<EOL>
Generates a command (the arguments) for the `salt` or `salt-ssh` CLI