From d4be7f772ac959dbb93d159f9e2761b14292641a Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 18 Apr 2018 09:14:26 -0700 Subject: [PATCH] Some more fixes for the docs :ref: disambiguation The big one is that we needed to set plugin_type when we processed the by_support template. Also added to list_of_CATEGORY_plugins page (which might not be used) and corrected a place where I did module_name instead of name_module (cherry picked from commit 8cdd75a09f471961f949428f689e7083bbeff2b5) --- docs/bin/plugin_formatter.py | 1 + docs/docsite/rst/user_guide/intro_adhoc.rst | 4 ++-- docs/templates/list_of_CATEGORY_plugins.rst.j2 | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/bin/plugin_formatter.py b/docs/bin/plugin_formatter.py index 12a034f62e9..6f1152de698 100755 --- a/docs/bin/plugin_formatter.py +++ b/docs/bin/plugin_formatter.py @@ -560,6 +560,7 @@ These modules are currently shipped with Ansible, but will most likely be shippe 'modules': data['modules'], 'slug': data['slug'], 'module_info': plugin_info, + 'plugin_type': plugin_type } text = templates['support_list'].render(template_data) write_data(text, output_dir, data['output']) diff --git a/docs/docsite/rst/user_guide/intro_adhoc.rst b/docs/docsite/rst/user_guide/intro_adhoc.rst index 0dd9e9fb6ef..a6b6f9d6f9b 100644 --- a/docs/docsite/rst/user_guide/intro_adhoc.rst +++ b/docs/docsite/rst/user_guide/intro_adhoc.rst @@ -94,12 +94,12 @@ specify that all of the time. We'll use ``-m`` in later examples to run some other :doc:`modules`. .. note:: - The :ref:`command module ` does not support extended shell syntax like piping and + The :ref:`command module ` does not support extended shell syntax like piping and redirects (although shell variables will always work). If your command requires shell-specific syntax, use the `shell` module instead. Read more about the differences on the :ref:`working_with_modules` page. -Using the :ref:`shell module ` looks like this:: +Using the :ref:`shell module ` looks like this:: $ ansible raleigh -m shell -a 'echo $TERM' diff --git a/docs/templates/list_of_CATEGORY_plugins.rst.j2 b/docs/templates/list_of_CATEGORY_plugins.rst.j2 index fba836c68b6..0f9b611fb16 100644 --- a/docs/templates/list_of_CATEGORY_plugins.rst.j2 +++ b/docs/templates/list_of_CATEGORY_plugins.rst.j2 @@ -25,7 +25,7 @@ .. toctree:: :maxdepth: 1 {% for module in info['_modules'] | sort %} - :ref:`@{ module }@`{% if module_info[module]['deprecated'] %} **(D)**{% endif%} -- @{ module_info[module]['doc']['short_description'] }@ + :ref:`@{ module }@_@{ plugin_type }@`{% if module_info[module]['deprecated'] %} **(D)**{% endif%} -- @{ module_info[module]['doc']['short_description'] }@ {% endfor %} {% endfor %}