Skip to content

Adding host patterns to ad-hoc command usage documentation. Fixes #1738 #2561

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

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
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