Ansible ad-hoc commands are mainly useful for one time task. for example if we want to check the whether servers are reachable, or to find kernel or os version for servers, in this section we are going to see few use cases with ansible adhoc commands
Ansible is an open source tool used to automate the daily tasks and avoid the repeated tasks, Ansible works on python and ssh protocol to communicate with the nodes. Ansible works on Control / Managed nodes, Control node is an Ansible node and client nodes are called managed nodes. We can use any servers as an Ansible control node, According to the Requirements we can configure Ansible control node.
For our repeated tasks we can create a playbook, using the playbook we can run multiple tasks. in this section we are going to see how to write a playbook for the package installation