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 |
What are the ansible modules?
How do I set the path or any other environment variable for a task?
Explain in detail about ad-hoc command?
Have you worked with ansible before? Please share your experience.
Why is ‘{{ }}’ notation used? And how can one interpolate variables or dynamic variable names?
Describe your newsletter ansible and who it’s aimed at.
How to access a variable of the first host in a group?
Suppose you’re using ansible to configure the production environment and your playbook uses an encrypted file. Encrypted files prompt the user to enter passwords. But since ansible is used for automation, can this process be automated?
What is the use of ansible vaults?
Is ansible an open source tool?
How does configuration management is help an organization?
What are the variables in ansible?