Open
Description
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.
Metadata
Metadata
Assignees
Type
Projects
Status
🆕 Triage