Skip to content
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

The ad-hoc command host pattern examples are missing the most common usage #1738

Open
HouzuoGuo opened this issue Aug 8, 2024 · 1 comment
Labels
new_contributor This PR is the first contribution by a new community member.

Comments

@HouzuoGuo
Copy link

https://docs.ansible.com/ansible/latest/inventory_guide/intro_patterns.html#patterns-and-ad-hoc-commands presented a couple of examples of specifying host patterns in --limit:

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

However --limit is rarely used in practice, because ansible command literally accepts the host pattern in its first argument:

usage: ansible [-h] [--version] [-v] [-b] [--become-method BECOME_METHOD] [--become-user BECOME_USER] [-K | --become-password-file BECOME_PASSWORD_FILE] [-i INVENTORY]
               ...
               [-f FORKS] [-M MODULE_PATH] [--playbook-dir BASEDIR] [--task-timeout TASK_TIMEOUT] [-a MODULE_ARGS] [-m MODULE_NAME]
               pattern <<<<<<<<<<<

Please include the far more commonly used ansible ... pattern invocation in the examples.

@ansible-documentation-bot ansible-documentation-bot bot added needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. labels Aug 8, 2024
@ansible-documentation-bot
Copy link
Contributor

Thanks for your Ansible docs contribution! We talk about Ansible documentation on matrix at #docs:ansible.im and on libera IRC at #ansible-docs if you ever want to join us and chat about the docs! We meet there on Tuesdays (see the Ansible calendar) and welcome additions to our weekly agenda items - scroll down to find the upcoming agenda and add a comment to put something new on that agenda.

@oraNod oraNod added the DaWGs Good discussion item for the DaWGs label Aug 8, 2024
@samccann samccann removed DaWGs Good discussion item for the DaWGs needs_triage Needs a first human triage before being processed. labels Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new_contributor This PR is the first contribution by a new community member.
Projects
Status: 🆕 Triage
Development

No branches or pull requests

3 participants