Running Ansible


there are 3 ways to run Ansible:

Ansible extensive list of builtin modules there are about 450~ modules in the list, some popular ones are:

trying our first command:


ansible virtualhosts -m ping

this will fail since we did not setup the passwordless ssh.


ansible virtualhosts -m ping
SSH password:
ubuntu-1 | UNREACHABLE! => {
    "changed": false,
    "msg": "Authentication failure.",
    "unreachable": true
}
ubuntu-2 | UNREACHABLE! => {
    "changed": false,
    "msg": "Authentication failure.",
    "unreachable": true
}