summaryrefslogtreecommitdiff
path: root/docs/docsite/rst/dev_guide
diff options
context:
space:
mode:
authorSandra McCann <samccann@redhat.com>2023-01-18 16:33:21 -0500
committerGitHub <noreply@github.com>2023-01-18 15:33:21 -0600
commit3a21caa2179437aecd5455c91f9dec88c19653a5 (patch)
tree7f317cf64e117e1089d6567ee378a7e13aefb701 /docs/docsite/rst/dev_guide
parent34ae99b516ef191238c9964f70b095c73b246222 (diff)
downloadansible-3a21caa2179437aecd5455c91f9dec88c19653a5.tar.gz
Backportapalooza 12 15 (#79607)
* Add big support table (#79221) Co-authored-by: samccann <samccann@redhat.com> Co-authored-by: Matt Clay <matt@mystile.com> (cherry picked from commit b3a1eabb7d7266eec3edac1b8b7810f0062707ed) * Add example of yaml file with --extra-vars (#79521) (cherry picked from commit aa268b8db27193dd3f842ad72860ec3aefc3620d) * Fix `:ref:` usage in testing docs. (#79566) (cherry picked from commit 245d51691191bafd4ab4d27e24812fc2a49e2297) * Typo in playbooks_blocks.rst (#79603) (cherry picked from commit 69c874f4785cb3ec63d98ab065a3aecc39797012) Co-authored-by: Matt Martz <matt@sivel.net> Co-authored-by: Michael Mayer <mjmayer@ucdavis.edu> Co-authored-by: Matt Clay <matt@mystile.com> Co-authored-by: Peter Tripp <petertripp@gmail.com>
Diffstat (limited to 'docs/docsite/rst/dev_guide')
-rw-r--r--docs/docsite/rst/dev_guide/testing_running_locally.rst24
1 files changed, 17 insertions, 7 deletions
diff --git a/docs/docsite/rst/dev_guide/testing_running_locally.rst b/docs/docsite/rst/dev_guide/testing_running_locally.rst
index 40910a87ec..0267fcdf6a 100644
--- a/docs/docsite/rst/dev_guide/testing_running_locally.rst
+++ b/docs/docsite/rst/dev_guide/testing_running_locally.rst
@@ -14,14 +14,16 @@ This document describes how to run tests using ``ansible-test``.
Setup
=====
-Before running ``ansible-test``, set up your environment for :ref:`Testing an Ansible Collection` or
-:ref:`Testing ansible-core`, depending on which scenario applies to you.
+Before running ``ansible-test``, set up your environment for :ref:`testing_an_ansible_collection` or
+:ref:`testing_ansible_core`, depending on which scenario applies to you.
.. warning::
If you use ``git`` for version control, make sure the files you are working with are not ignored by ``git``.
If they are, ``ansible-test`` will ignore them as well.
+.. _testing_an_ansible_collection:
+
Testing an Ansible Collection
-----------------------------
@@ -60,6 +62,8 @@ For example, to work with the ``community.windows`` collection, follow these ste
cd ~/dev/ansible_collections/community/windows
+.. _testing_ansible_core:
+
Testing ``ansible-core``
------------------------
@@ -179,6 +183,8 @@ These instructions explain how to use ``ansible-test`` with WSL2 and Docker Desk
If your WSL2 environment includes ``systemd`` support, these steps are not required.
+.. _configuration_requirements:
+
Configuration requirements
""""""""""""""""""""""""""
@@ -194,6 +200,8 @@ Configuration requirements
4. Click **Apply and restart** if changes were made.
+.. setup_instructions:
+
Setup instructions
""""""""""""""""""
@@ -201,7 +209,7 @@ Setup instructions
If all WSL instances have been stopped, these changes will need to be re-applied.
-1. Verify Docker Desktop is properly configured (see :ref:`Configuration requirements`).
+1. Verify Docker Desktop is properly configured (see :ref:`configuration_requirements`).
2. Quit Docker Desktop if it is running:
a. Right click the **Docker Desktop** taskbar icon.
@@ -229,8 +237,8 @@ Setup instructions
grep systemd /proc/self/cgroup
- b. If any matches are found, re-check the :ref:`Configuration requirements` and follow the
- :ref:`Setup instructions` again.
+ b. If any matches are found, re-check the :ref:`configuration_requirements` and follow the
+ :ref:`setup_instructions` again.
b. Mount the ``systemd`` cgroup hierarchy with the following commands:
@@ -243,6 +251,8 @@ Setup instructions
You should now be able to use ``ansible-test`` with the ``--docker`` option.
+.. linux_cgroup_configuration:
+
Linux cgroup configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -268,7 +278,7 @@ Make sure to substitute your user and group for ``{user}`` and ``{group}`` respe
Podman
""""""
-When using Podman, you may need to stop existing Podman processes after following the :ref:`Linux cgroup configuration`
+When using Podman, you may need to stop existing Podman processes after following the :ref:`linux_cgroup_configuration`
instructions. Otherwise Podman may be unable to see the new mount point.
You can check to see if Podman is running by looking for ``podman`` and ``catatonit`` processes.
@@ -334,7 +344,7 @@ When using environment variables to manipulate tests there some limitations to k
Example: ``ANSIBLE_KEEP_REMOTE_FILES=1`` can be set when running ``ansible-test integration --venv``. However, using the ``--docker`` option would
require running ``ansible-test shell`` to gain access to the Docker environment. Once at the shell prompt, the environment variable could be set
and the tests executed. This is useful for debugging tests inside a container by following the
- :ref:`Debugging AnsibleModule-based modules <debugging_modules>` instructions.
+ :ref:`debugging_modules` instructions.
Interactive shell
=================