Inbuilt commands
When we installed Ansible, there were several different commands installed. These were:
ansible
ansible-config
ansible-console
ansible-doc
ansible-inventory
ansible-vault
We will be covering a few of the commands, such as ansible-galaxy
, ansible-playbook
, and ansible-pull
, in later chapters, so I will not go into any detail about those commands in this chapter. Let's make a start at the top of the list with a command we have already used.
Ansible
Now, you would have thought that ansible
is going to be the most common command we will be using throughout this book, but it isn't.
The ansible
command is really only ever used for running ad hoc commands again in a single or collection of hosts. In the last chapter, we created a host inventory file that targeted a single local virtual machine. For this chapter, let's take a look at targeting four different hosts running in DigitalOcean; my hosts file looks as follows:
ansible01 ansible_host=46.101.92.240 ansible02 ansible_host=159.65.63...