summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanou <8667089+vanou@users.noreply.github.com>2022-09-16 00:37:03 +0900
committerGitHub <noreply@github.com>2022-09-15 11:37:03 -0400
commitc7b4a25f9d668c45436ef57503c41bd1abb9d4fd (patch)
tree40612f69cbba7a2365f1b0ad227bbb19d17fcfaf
parentdb33ca8e1a8b9805eb0a074eee86aaa2237065cd (diff)
downloadansible-c7b4a25f9d668c45436ef57503c41bd1abb9d4fd.tar.gz
Fix typo and wrong syntax in intro_patterns.rst (#78702)
-rw-r--r--docs/docsite/rst/inventory_guide/intro_patterns.rst19
1 files changed, 11 insertions, 8 deletions
diff --git a/docs/docsite/rst/inventory_guide/intro_patterns.rst b/docs/docsite/rst/inventory_guide/intro_patterns.rst
index b4a47e6a84..446b7d4ca2 100644
--- a/docs/docsite/rst/inventory_guide/intro_patterns.rst
+++ b/docs/docsite/rst/inventory_guide/intro_patterns.rst
@@ -125,10 +125,11 @@ you must use the alias in your pattern. In the example above, you must use ``hos
Pattern processing order
------------------------
-The processing is a bit special and happens in the following order:
-1. ``:`` and ``,``
-2. `` &``
-3. ``!``
+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``
@@ -197,25 +198,25 @@ You can also limit the hosts you target on a particular run with the ``--limit``
.. code-block:: bash
- $ ansible -m [module] -a "[module options]" --limit "host1"
+ $ ansible all -m [module] -a "[module options]" --limit "host1"
* Limit to multiple hosts
.. code-block:: bash
- $ ansible -m [module] -a "[module options]" --limit "host1,host2"
+ $ ansible all -m [module] -a "[module options]" --limit "host1,host2"
* Negated limit. Note that single quotes MUST be used to prevent bash interpolation.
.. code-block:: bash
- $ ansible -m [module] -a "[module options]" --limit 'all:!host1'
+ $ ansible all -m [module] -a "[module options]" --limit 'all:!host1'
* Limit to host group
.. code-block:: bash
- $ ansible -m [module] -a "[module options]" --limit 'group1'
+ $ ansible all -m [module] -a "[module options]" --limit 'group1'
Patterns and ansible-playbook flags
-----------------------------------
@@ -234,6 +235,8 @@ Finally, you can use ``--limit`` to read the list of hosts from a file by prefix
If :ref:`RETRY_FILES_ENABLED` is set to ``True``, a ``.retry`` file will be created after the ``ansible-playbook`` run containing a list of failed hosts from all plays. This file is overwritten each time ``ansible-playbook`` finishes running.
+.. code-block:: bash
+
ansible-playbook site.yml --limit @site.retry
To apply your knowledge of patterns with Ansible commands and playbooks, read :ref:`intro_adhoc` and :ref:`playbooks_intro`.