

It returns a pong message upon successful verification. Instead, it is a trivial test module that checks the ability to login and the presence of a usable Python module. And no, it doesn’t send an ICMP echo request to verify the availability of a host. One of the most commonly used Ansible modules is the ping module. This happens when the module requires the just discussed additional arguments Some of the modules require some additional arguments to specify the finer details of a task.įinally, the -a option accepts a list of arguments as quoted strings. Modules are Ansible built-in programs that are used to execute specific tasks. The -m option takes the module name that should be run on the managed host. Just a by-the-way, you can check the hosts listed in your inventory file using the –list-hosts option as shown in the command below:Īssuming that you have a hostgroup called webservers, run: $ ansible webservers -list-hosts This could be a host group or a single host specified in the Ansible inventory file. The argument specifies the remote hosts on which the ad hoc commands are run. The syntax used when running an ad hoc command is as shown:
