2 edited body
source | link

I can't think of an instance where you would not be able to run an ansible module in ad-hoc mode, assuming the module is appropriate for the target host. Also, all modules must conform to the same standard (most notably return all output as JSON). Because you can add all module arguments in via the "-a" flag using ansible in ad-hoc mode, functionally it's not different thenthan executing the same command/task from a playbook (make no mistake though, playbooks are far more powerful).

Ad-hoc commands are very useful to perform quick tasks and/or checks, but anything further than that should probably be a playbook. A better overview can be found in the official docs: https://docs.ansible.com/ansible/latest/user_guide/intro_adhoc.html

I can't think of an instance where you would not be able to run an ansible module in ad-hoc mode, assuming the module is appropriate for the target host. Also, all modules must conform to the same standard (most notably return all output as JSON). Because you can add all module arguments in via the "-a" flag using ansible in ad-hoc mode, functionally it's not different then executing the same command/task from a playbook (make no mistake though, playbooks are far more powerful).

Ad-hoc commands are very useful to perform quick tasks and/or checks, but anything further than that should probably be a playbook. A better overview can be found in the official docs: https://docs.ansible.com/ansible/latest/user_guide/intro_adhoc.html

I can't think of an instance where you would not be able to run an ansible module in ad-hoc mode, assuming the module is appropriate for the target host. Also, all modules must conform to the same standard (most notably return all output as JSON). Because you can add all module arguments in via the "-a" flag using ansible in ad-hoc mode, functionally it's not different than executing the same command/task from a playbook (make no mistake though, playbooks are far more powerful).

Ad-hoc commands are very useful to perform quick tasks and/or checks, but anything further than that should probably be a playbook. A better overview can be found in the official docs: https://docs.ansible.com/ansible/latest/user_guide/intro_adhoc.html

1
source | link

I can't think of an instance where you would not be able to run an ansible module in ad-hoc mode, assuming the module is appropriate for the target host. Also, all modules must conform to the same standard (most notably return all output as JSON). Because you can add all module arguments in via the "-a" flag using ansible in ad-hoc mode, functionally it's not different then executing the same command/task from a playbook (make no mistake though, playbooks are far more powerful).

Ad-hoc commands are very useful to perform quick tasks and/or checks, but anything further than that should probably be a playbook. A better overview can be found in the official docs: https://docs.ansible.com/ansible/latest/user_guide/intro_adhoc.html