New in version 2018.3.0.
Execution module that processes JSON serializable data and returns string having the format as processed by the outputters.
Although this does not bring much value on the CLI, it turns very handy in applications that require human readable data rather than Python objects.
For example, inside a Jinja template:
{{ salt.out.string_format(complex_object, out='highstate') }}
Return the formatted string as HTML.
The JSON serializable object.
nested
The name of the output to use to transform the data. Default: nested
.
Dictionary of configuration options. Default: __opts__
.
Arguments to sent to the outputter module.
CLI Example:
salt '*' out.html_format "{'key': 'value'}" out=yaml
Return the formatted outputter string for the Python object.
The JSON serializable object.
nested
The name of the output to use to transform the data. Default: nested
.
Dictionary of configuration options. Default: __opts__
.
Arguments to sent to the outputter module.
CLI Example:
salt '*' out.out_format "{'key': 'value'}"
Return the outputter formatted string, removing the ANSI escape sequences.
The JSON serializable object.
nested
The name of the output to use to transform the data. Default: nested
.
Dictionary of configuration options. Default: __opts__
.
Arguments to sent to the outputter module.
CLI Example:
salt '*' out.string_format "{'key': 'value'}" out=table