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.
nested
nested
.__opts__
.CLI Example:
salt '*' out.html_format "{'key': 'value'}" out=yaml
Return the formatted outputter string for the Python object.
nested
nested
.__opts__
.CLI Example:
salt '*' out.out_format "{'key': 'value'}"
Return the outputter formatted string, removing the ANSI escape sequences.
nested
nested
.__opts__
.CLI Example:
salt '*' out.string_format "{'key': 'value'}" out=table
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.out.html