From 85bc2bcfcdd233acf1f5d4309b8ecfcb997ff06c Mon Sep 17 00:00:00 2001 From: Tabah Baridule Date: Thu, 28 Jul 2022 19:27:22 +0100 Subject: [PATCH] Update information on the Intro_patterns.rst (#78192) --- .../docsite/rst/user_guide/intro_patterns.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/docsite/rst/user_guide/intro_patterns.rst b/docs/docsite/rst/user_guide/intro_patterns.rst index e163950184b..3d0686da504 100644 --- a/docs/docsite/rst/user_guide/intro_patterns.rst +++ b/docs/docsite/rst/user_guide/intro_patterns.rst @@ -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 ------------------------