Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/docsite/rst/inventory_guide/intro_patterns.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,24 @@ You can also limit the hosts you target on a particular run with the ``--limit``

$ ansible all -m <module> -a "<module options>" --limit "host1"

* One host with pattern

.. code-block:: bash

$ ansible <host pattern> -m <module> -a "<module options>"

* Limit to multiple hosts

.. code-block:: bash

$ ansible all -m <module> -a "<module options>" --limit "host1,host2"

* Multiple hosts with pattern

.. code-block:: bash

$ ansible <host pattern> -m <module> -a "<module options>"

* Negated limit. Note that single quotes MUST be used to prevent bash interpolation.

.. code-block:: bash
Expand Down