diff --git a/docs/docsite/rst/api/index.rst b/docs/docsite/rst/api/index.rst index 9e0ad33726ab0b..27afbe42cc32d3 100644 --- a/docs/docsite/rst/api/index.rst +++ b/docs/docsite/rst/api/index.rst @@ -101,5 +101,7 @@ Modules .. py:module:: ansible.module_utils .. py:module:: ansible.module_utils.basic + :noindex: + .. py:module:: ansible.module_utils.url diff --git a/docs/docsite/rst/dev_guide/developing_collections.rst b/docs/docsite/rst/dev_guide/developing_collections.rst index f24ea38f4cbeb1..5c10552a09d52a 100644 --- a/docs/docsite/rst/dev_guide/developing_collections.rst +++ b/docs/docsite/rst/dev_guide/developing_collections.rst @@ -373,7 +373,7 @@ Using the ``token`` argument You can use the ``--token`` argument with the ``ansible-galaxy`` command (in conjunction with the ``--server`` argument or :ref:`GALAXY_SERVER` setting in your :file:`ansible.cfg` file). You cannot use ``apt-key`` with any servers defined in your :ref:`Galaxy server list `. -.. code-block:: bash +.. code-block:: text ansible-galaxy collection publish ./geerlingguy-collection-1.2.3.tar.gz --token= diff --git a/docs/docsite/rst/dev_guide/developing_modules_general_aci.rst b/docs/docsite/rst/dev_guide/developing_modules_general_aci.rst index 3ca8ef01d25be6..07b5d3e17aaa1f 100644 --- a/docs/docsite/rst/dev_guide/developing_modules_general_aci.rst +++ b/docs/docsite/rst/dev_guide/developing_modules_general_aci.rst @@ -263,7 +263,7 @@ Example: ``aci.post_config()`` Example code """""""""""" -.. code-block:: guess +.. code-block:: text if state == 'present': aci.payload( @@ -295,7 +295,7 @@ When state is absent ^^^^^^^^^^^^^^^^^^^^ If the task sets the state to absent, then the ``delete_config()`` method is all that is needed. This method does not take any arguments, and handles check mode. -.. code-block:: guess +.. code-block:: text elif state == 'absent': aci.delete_config() @@ -305,7 +305,7 @@ Exiting the module ^^^^^^^^^^^^^^^^^^ To have the module exit, call the ACIModule method ``exit_json()``. This method automatically takes care of returning the common return values for you. -.. code-block:: guess +.. code-block:: text aci.exit_json() diff --git a/docs/docsite/rst/dev_guide/migrating_roles.rst b/docs/docsite/rst/dev_guide/migrating_roles.rst index f6f3859ccccc77..a32fa242501407 100644 --- a/docs/docsite/rst/dev_guide/migrating_roles.rst +++ b/docs/docsite/rst/dev_guide/migrating_roles.rst @@ -211,7 +211,7 @@ If any of your custom modules use a custom module utility, once you migrate to a When coding with ``module_utils`` in a collection, the Python import statement needs to take into account the :abbr:`FQCN (Fully Qualified Collection Name)` along with the ``ansible_collections`` convention. The resulting Python import looks similar to the following example: -.. code-block:: python +.. code-block:: text from ansible_collections.{namespace}.{collectionname}.plugins.module_utils.{util} import {something} @@ -223,7 +223,7 @@ The following example code snippets show a Python and a PowerShell module using In the Python example the ``module_utils`` is ``helper`` and the :abbr:`FQCN (Fully Qualified Collection Name)` is ``ansible_example.community.plugins.module_utils.helper``: -.. code-block:: python +.. code-block:: text from ansible.module_utils.basic import AnsibleModule from ansible.module_utils._text import to_text diff --git a/docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst b/docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst index b0e12190bd0c8f..cd221812352f88 100644 --- a/docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst +++ b/docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst @@ -337,7 +337,7 @@ Module * ``library/_.py``. * Imports the ``module_utils`` resource package and calls ``execute_module`` API - .. code-block:: python + .. code-block:: text def main(): result = (module).execute_module() diff --git a/docs/docsite/rst/porting_guides/porting_guide_2.3.rst b/docs/docsite/rst/porting_guides/porting_guide_2.3.rst index d3f94543dfbd24..e214367a2afff3 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.3.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.3.rst @@ -27,7 +27,7 @@ In Ansible 2.2 (and possibly earlier) the `async:` keyword could not be used in **NEW** In Ansible 2.3: -.. code-block:: guess +.. code-block:: yaml - name: Install nginx asynchronously service: @@ -44,7 +44,7 @@ The `ansible_distribution_release` and `ansible_distribution_version` facts on O **OLD** In Ansible 2.2 (and earlier) -.. code-block:: guess +.. code-block:: bash "ansible_distribution": "OpenBSD" "ansible_distribution_release": "6.0", @@ -53,7 +53,7 @@ The `ansible_distribution_release` and `ansible_distribution_version` facts on O **NEW** In Ansible 2.3: -.. code-block:: guess +.. code-block:: bash "ansible_distribution": "OpenBSD", "ansible_distribution_release": "release", @@ -69,7 +69,7 @@ Blocks can now have names, this allows you to avoid the ugly `# this block is fo **NEW** In Ansible 2.3: -.. code-block:: guess +.. code-block:: yaml - name: Block test case hosts: localhost @@ -185,7 +185,7 @@ Deprecation of top-level connection arguments **OLD** In Ansible 2.2: -.. code-block:: guess +.. code-block:: yaml - name: example of using top-level options for connection properties ios_command: @@ -198,7 +198,7 @@ Deprecation of top-level connection arguments Will result in: -.. code-block:: guess +.. code-block:: bash [WARNING]: argument username has been deprecated and will be removed in a future version [WARNING]: argument host has been deprecated and will be removed in a future version @@ -208,7 +208,7 @@ Will result in: **NEW** In Ansible 2.3: -.. code-block:: guess +.. code-block:: yaml - name: Gather facts eos_facts: