Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs Backportapalooza #78379

Merged
merged 4 commits into from Jul 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/docsite/rst/dev_guide/testing/sanity/ignores.rst
Expand Up @@ -74,7 +74,7 @@ If the named test uses error codes then the error code to ignore must be appende
Below are some example ignore entries for an Ansible collection::

roles/my_role/files/my_script.sh shellcheck:SC2154 # ignore undefined variable
plugins/modules/my_module.py validate-modules:E105 # ignore license check
plugins/modules/my_module.py validate-modules:missing-gplv3-license # ignore license check
plugins/modules/my_module.py import-3.8 # needs update to support collections.abc on Python 3.8+

It is also possible to skip a sanity test for a specific file.
Expand All @@ -86,6 +86,8 @@ Below are some example skip entries for an Ansible collection::
plugins/module_utils/my_util.py validate-modules!skip # waiting for bug fix in module validator
plugins/lookup/my_plugin.py compile-2.6!skip # Python 2.6 is not supported on the controller

See the full list of :ref:`sanity tests <all_sanity_tests>`, which details the various tests and details how to fix identified issues.

Ignore File Errors
------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/docsite/rst/user_guide/complex_data_manipulation.rst
Expand Up @@ -193,7 +193,7 @@ This example uses `Python argument list unpacking <https://docs.python.org/3/tut

- hosts: all
vars:
mygroups
mygroups:
- prod
- web
tasks:
Expand Down
19 changes: 19 additions & 0 deletions docs/docsite/rst/user_guide/intro_patterns.rst
Expand Up @@ -117,6 +117,25 @@ you must use the alias in your pattern. In the example above, you must use ``hos
.. code-block:: console

[WARNING]: Could not match supplied host pattern, ignoring: 127.0.0.2

Pattern processing order
------------------------

The processing is a bit special and happens in the following order:
1. ``:`` and ``,``
2. `` &``
3. ``!``

This positioning only accounts for processing order inside each operation:
``a:b:&c:!d:!e == &c:a:!d:b:!e == !d:a:!e:&c:b``

All of these result in the following:

Host in/is (a or b) AND host in/is all(c) AND host NOT in/is all(d, e).

Now ``a:b:!e:!d:&c`` is a slight change as the ``!e`` gets processed before the ``!d``, though this doesn't make much of a difference:

Host in/is (a or b) AND host in/is all(c) AND host NOT in/is all(e, d).

Advanced pattern options
------------------------
Expand Down
4 changes: 4 additions & 0 deletions lib/ansible/plugins/doc_fragments/files.py
Expand Up @@ -34,10 +34,14 @@ class ModuleDocFragment(object):
owner:
description:
- Name of the user that should own the filesystem object, as would be fed to I(chown).
- When left unspecified, it uses the current user unless you are root, in which
case it can preserve the previous ownership.
type: str
group:
description:
- Name of the group that should own the filesystem object, as would be fed to I(chown).
- When left unspecified, it uses the current group of the current user unless you are root,
in which case it can preserve the previous ownership.
type: str
seuser:
description:
Expand Down