Skip to content

Commit

Permalink
[WIP] disambiguating autogenerated module docs attempted fix of ansib…
Browse files Browse the repository at this point in the history
…le#38439. (ansible#38890)

Disambiguates autogenerated module docs - fixes ansible#38439.
  • Loading branch information
dharmabumstead authored Apr 18, 2018
1 parent 50d151a commit c97e508
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 24 deletions.
5 changes: 3 additions & 2 deletions docs/docsite/rst/installation_guide/intro_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ An `example file is available on Github <https://raw.github.com/ansible/ansible/

For more details and a full listing of available configurations go to :ref:`configuration_settings`. Starting with Ansible version 2.4, you can use the :ref:`ansible-config` command line utility to list your available options and inspect the current values.

For in-depth details, see :ref:`config`.
For in-depth details, see :ref:`ansible_configuration_settings`.


Environmental configuration
Expand All @@ -42,7 +42,8 @@ Environmental configuration
Ansible also allows configuration of settings using environment variables.
If these environment variables are set, they will override any setting loaded from the configuration file.

You can get a full listing of available environment variables from :doc:`_config`.
You can get a full listing of available environment variables from :ref:`ansible_configuration_settings`.


.. _command_line_configuration:

Expand Down
30 changes: 16 additions & 14 deletions docs/docsite/rst/plugins/callback.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ or for my custom callback:
stdout_callback = mycallback
This only affects :doc:`../ansible-playbook` by default.
This only affects :ref:`ansible-playbook` by default.

Managing AdHoc
``````````````

The :doc:`ansible <../ansible>` AdHoc command specifically uses a different callback plugin for stdout,
so there is an extra setting in :doc:`ansible.cfg <../config>` you need to add to use the stdout callback defined above:
The :ref:`ansible` ad hoc command specifically uses a different callback plugin for stdout,
so there is an extra setting in :ref:`ansible_configuration_settings` you need to add to use the stdout callback defined above:

.. code-block:: ini
Expand Down Expand Up @@ -87,19 +87,21 @@ Use ``ansible-doc -t callback <plugin name>`` to see specific documents and exam

.. seealso::

:doc:`../playbooks`
An introduction to playbooks
:doc:`action`
Ansible Action plugins
:doc:`cache`
Ansible cache plugins
:doc:`connection`
Ansible connection plugins
:doc:`inventory`
Ansible inventory plugins
:doc:`../playbooks_filters`
Jinja2 filter plugins
:doc:`../playbooks_tests`
Jinja2 test plugins
:doc:`../playbooks_lookups`
Jinja2 lookup plugins
:doc:`shell`
Ansible Shell plugins
:doc:`strategy`
Ansible Strategy plugins
:doc:`vars`
Ansible vars plugins
`User Mailing List <http://groups.google.com/group/ansible-devel>`_
Ansible Vars plugins
`User Mailing List <https://groups.google.com/forum/#!forum/ansible-devel>`_
Have a question? Stop by the google group!
`irc.freenode.net <http://irc.freenode.net>`_
`webchat.freenode.net <https://webchat.freenode.net>`_
#ansible IRC chat channel
9 changes: 5 additions & 4 deletions docs/docsite/rst/user_guide/intro_adhoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +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 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.
The :ref:`command module <module_command>` 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 <module_shell>` looks like this::

$ ansible raleigh -m shell -a 'echo $TERM'

Expand Down
2 changes: 2 additions & 0 deletions docs/templates/config.rst.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _ansible_configuration_settings:

{% set name = 'Ansible Configuration Settings' -%}
{% set name_slug = 'config' -%}

Expand Down
4 changes: 2 additions & 2 deletions docs/templates/list_of_CATEGORY_modules.rst.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% if category['_modules'] %}

{% for module in category['_modules'] | sort %}
* :ref:`@{ module }@`{% if module_info[module]['deprecated'] %} **(D)**{% endif%}
* :ref:`@{ module }@_@{ plugin_type }@`{% if module_info[module]['deprecated'] %} **(D)**{% endif%}
{% endfor %}
{% endif %}

Expand All @@ -25,7 +25,7 @@


{% for module in info['_modules'] | sort %}
* :ref:`@{ module }@`{% if module_info[module]['deprecated'] %} **(D)**{% endif%}
* :ref:`@{ module }@_@{ plugin_type }@`{% if module_info[module]['deprecated'] %} **(D)**{% endif%}
{% endfor %}

{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion docs/templates/modules_by_support.rst.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Modules Maintained by the @{ maintainers }@
``````````````````````````@{ '`' * maintainers | length }@

{% for module in modules | sort %}
* :ref:`@{ module }@`{% if module_info[module]['deprecated'] %} **(D)**{% endif%}
* :ref:`@{ module }@_@{plugin_type}@`{% if module_info[module]['deprecated'] %} **(D)**{% endif%}
{% endfor %}

.. note::
Expand Down
2 changes: 1 addition & 1 deletion docs/templates/plugin.rst.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:source: @{ source }@

.. _@{ module }@:
.. _@{ module }@_@{ plugin_type }@:
{% for alias in aliases %}
.. _@{ alias }@:
{% endfor %}
Expand Down

0 comments on commit c97e508

Please sign in to comment.