Fix typo and wrong syntax in intro_patterns.rst (#78702)

pull/78785/head
vanou 2 years ago committed by GitHub
parent db33ca8e1a
commit c7b4a25f9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -126,8 +126,9 @@ Pattern processing order
------------------------
The processing is a bit special and happens in the following order:
1. ``:`` and ``,``
2. `` &``
2. ``&``
3. ``!``
This positioning only accounts for processing order inside each operation:
@ -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`.

Loading…
Cancel
Save