What are ad-hoc commands? Give an example.
Answer / Pradip Yadav
"Ad-hoc commands in Ansible refer to standalone or one-off commands that can be executed on remote hosts without creating a playbook. They are useful for tasks that don't require repetition across multiple hosts. An example of an ad-hoc command is running a shell command on a specific host:n[
"ansible all -m shell -a 'uname -a' "]
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain different modules in ansible.
Does ansible support hardware provisioning?
Compare ansible with chef.
What is configuration management and how does it help an organization?
What is ansible task?
What is ansible and what makes it stand out from the rest of the configuration management tools?
What is ansible role and how are they different from the playbook?
When should I use {{ }}? Also, how to interpolate variables or dynamic variable names
How to access a variable of the first host in a group?
When should you test playbooks and roles?
How to keep secret data in playbook?
What are ad-hoc commands?