output-options.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. Output Options
  2. --------------
  3. .. option:: --out
  4. Pass in an alternative outputter to display the return of data. This
  5. outputter can be any of the available outputters:
  6. ``highstate``, ``json``, ``key``, ``overstatestage``, ``pprint``, ``raw``, ``txt``, ``yaml``, and :ref:`many others <all-salt.output>`.
  7. Some outputters are formatted only for data returned from specific functions.
  8. If an outputter is used that does not support the data passed into it, then
  9. Salt will fall back on the ``pprint`` outputter and display the return data
  10. using the Python ``pprint`` standard library module.
  11. .. note::
  12. If using ``--out=json``, you will probably want ``--static`` as well.
  13. Without the static option, you will get a separate JSON string per minion
  14. which makes JSON output invalid as a whole.
  15. This is due to using an iterative outputter. So if you want to feed it
  16. to a JSON parser, use ``--static`` as well.
  17. .. option:: --out-indent OUTPUT_INDENT, --output-indent OUTPUT_INDENT
  18. Print the output indented by the provided value in spaces. Negative values
  19. disable indentation. Only applicable in outputters that support
  20. indentation.
  21. .. option:: --out-file=OUTPUT_FILE, --output-file=OUTPUT_FILE
  22. Write the output to the specified file.
  23. .. option:: --out-file-append, --output-file-append
  24. Append the output to the specified file.
  25. .. option:: --no-color
  26. Disable all colored output
  27. .. option:: --force-color
  28. Force colored output
  29. .. note::
  30. When using colored output the color codes are as follows:
  31. ``green`` denotes success, ``red`` denotes failure, ``blue`` denotes
  32. changes and success and ``yellow`` denotes a expected future change in configuration.
  33. .. option:: --state-output=STATE_OUTPUT, --state_output=STATE_OUTPUT
  34. Override the configured state_output value for minion
  35. output. One of 'full', 'terse', 'mixed', 'changes' or
  36. 'filter'. Default: 'none'.
  37. .. option:: --state-verbose=STATE_VERBOSE, --state_verbose=STATE_VERBOSE
  38. Override the configured state_verbose value for minion
  39. output. Set to True or False. Default: none.