1.

What is the ad-hoc command in Ansible?

Answer»

Ad-hoc commands are like one-line playbooks to perform a specific TASK only. The syntax for the ad-hoc COMMAND is

ansible [PATTERN] -m [module] -a "[module options]"

For EXAMPLE, we need to reboot all servers in the staging group

ansible atlanta -a "/sbin/reboot" -u username --become [--ask-become-pass]


Discussion

No Comment Found