diff --git a/doc/conf.py b/doc/conf.py index d6a53da71b..5b57681f77 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -106,7 +106,7 @@ release = '.'.join(map(str, salt.version.__version_info__)) master_doc = 'contents' templates_path = ['_templates'] -exclude_patterns = ['_build', '_incl/*'] +exclude_patterns = ['_build', '_incl/*', 'ref/cli/_includes/*.rst'] extensions = [ 'saltdocs', diff --git a/doc/ref/cli/_includes/output-options.rst b/doc/ref/cli/_includes/output-options.rst new file mode 100644 index 0000000000..fe57c8e9f6 --- /dev/null +++ b/doc/ref/cli/_includes/output-options.rst @@ -0,0 +1,24 @@ +Output Options +-------------- + +.. option:: --out + + Pass in an alternative outputter to display the return of data. This + outputter can be any of the available outputters: + grains, highstate, json, key, overstatestage, pprint, raw, txt, yaml + Some outputters are formatted only for data returned from specific + functions, for instance the grains outputter will not work for non grains + data. + If an outputter is used that does not support the data passed into it, then + Salt will fall back on the pprint outputter and display the return data + using the python pprint library. + +.. option:: --out-indent OUTPUT_INDENT, --output-indent OUTPUT_INDENT + + Print the output indented by the provided value in spaces. Negative values + disables indentation. Only applicable in outputters that support + indentation. + +.. option:: --no-color + + Disable all colored output diff --git a/doc/ref/cli/salt-call.rst b/doc/ref/cli/salt-call.rst index fbaf323e73..cb4f554ab7 100644 --- a/doc/ref/cli/salt-call.rst +++ b/doc/ref/cli/salt-call.rst @@ -60,26 +60,7 @@ Options the configuration files for Salt master and minions. The default location on most systems is /etc/salt. -.. option:: --out - - Pass in an alternative outputter to display the return of data. This - outputter can be any of the available outputters: - grains, highstate, json, key, overstatestage, pprint, raw, txt, yaml - Some outputters are formatted only for data returned from specific - functions, for instance the grains outputter will not work for non grains - data. - If an outputter is used that does not support the data passed into it, then - Salt will fall back on the pprint outputter and display the return data - using the python pprint library. - -.. option:: --out-indent OUTPUT_INDENT, --output-indent OUTPUT_INDENT - - Print the output indented by the provided value in spaces. Negative values - disables indentation. Only applicable in outputters that support indentation. - -.. option:: --no-color - - Disable all colored output +.. include:: _include/output-options.rst .. option:: --version diff --git a/doc/ref/cli/salt-key.rst b/doc/ref/cli/salt-key.rst index 9c5c700c30..10a8d531e1 100644 --- a/doc/ref/cli/salt-key.rst +++ b/doc/ref/cli/salt-key.rst @@ -101,26 +101,7 @@ Options higher, otherwise it will be rounded up to 2048. The default is 2048. -.. option:: --out - - Pass in an alternative outputter to display the return of data. This - outputter can be any of the available outputters: - grains, highstate, json, key, overstatestage, pprint, raw, txt, yaml - Some outputters are formatted only for data returned from specific - functions, for instance the grains outputter will not work for non grains - data. - If an outputter is used that does not support the data passed into it, then - Salt will fall back on the pprint outputter and display the return data - using the python pprint library. - -.. option:: --out-indent OUTPUT_INDENT, --output-indent OUTPUT_INDENT - - Print the output indented by the provided value in spaces. Negative values - disables indentation. Only applicable in outputters that support indentation. - -.. option:: --no-color - - Disable all colored output +.. include:: _includes/output-options.rst .. option:: --version diff --git a/doc/ref/cli/salt-ssh.rst b/doc/ref/cli/salt-ssh.rst index 09a75455dc..e4f2660320 100644 --- a/doc/ref/cli/salt-ssh.rst +++ b/doc/ref/cli/salt-ssh.rst @@ -54,26 +54,8 @@ Options the configuration files for Salt master and minions. The default location on most systems is /etc/salt. -.. option:: --out +.. include:: _includes/output-options.rst - Pass in an alternative outputter to display the return of data. This - outputter can be any of the available outputters: - grains, highstate, json, key, overstatestage, pprint, raw, txt, yaml - Some outputters are formatted only for data returned from specific - functions, for instance the grains outputter will not work for non grains - data. - If an outputter is used that does not support the data passed into it, then - Salt will fall back on the pprint outputter and display the return data - using the python pprint library. - -.. option:: --out-indent OUTPUT_INDENT, --output-indent OUTPUT_INDENT - - Print the output indented by the provided value in spaces. Negative values - disables indentation. Only applicable in outputters that support indentation. - -.. option:: --no-color - - Disable all colored output See also ======== diff --git a/doc/ref/cli/salt.rst b/doc/ref/cli/salt.rst index 470adc4e8c..b1a85dc77e 100644 --- a/doc/ref/cli/salt.rst +++ b/doc/ref/cli/salt.rst @@ -156,32 +156,7 @@ Options Return the documentation for the module functions available on the minions -.. option:: --out - - Pass in an alternative outputter to display the return of data. This - outputter can be any of the available outputters: - grains, highstate, json, key, overstatestage, pprint, raw, txt, yaml - Some outputters are formatted only for data returned from specific - functions, for instance the grains outputter will not work for non grains - data. - - If an outputter is used that does not support the data passed into it, then - Salt will fall back on the pprint outputter and display the return data - using the python pprint library. - - Note: If using --out=json, you will probably want --static as well. Without - the static option you will get a JSON strign for each minion. This is due to - using an iterative outputter. So if you want to feed it to a JSON parser, use - --static as well. - -.. option:: --out-indent OUTPUT_INDENT, --output-indent OUTPUT_INDENT - - Print the output indented by the provided value in spaces. Negative values - disables indentation. Only applicable in outputters that support indentation. - -.. option:: --no-color - - Disable all colored output +.. include:: _includes/output-options.rst See also ========