# My first Ansible code:
Prabhus-MacBook-Pro:vagrant_dir AKP$ ansible example -m ping -u root -k
SSH password:
192.168.18.156 | SUCCESS => {
"changed": false,
"failed": false,
"ping": "pong"
}
# List of Modules (-m option):
http://docs.ansible.com/ansible/latest/list_of_all_modules.html
# Using "module arguments" (-a) and performing another code execution:
# List of Modules (-m option):
http://docs.ansible.com/ansible/latest/list_of_all_modules.html
# Using "module arguments" (-a) and performing another code execution:
Prabhus-MacBook-Pro:vagrant_dir AKP$ ansible example -a 'free -m' -u root --ask-pass
SSH password:
192.168.18.156 | SUCCESS | rc=0 >>
total used free shared buff/cache available
Mem: 1992 1672 75 42 244 78
Swap: 2047 235 1812