Ansible quickreference
Note: ansible.cfg will be read in order from the following locations: ANSIBLE_CONFIG env variable, current dir, home_dir/.ansible.cfg, /etc/ansible/ansible.cfg
Command | Description | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ansible Shutdown vms | </tr>
ansible-doc -l | List available modules | ansible all --list-hosts | List all hosts defied in your inventory | ansible -m ping group | Run ping against all vms in group defined in hosts file | ansible | Overwrite hostsfile | </tr>
ansible all -m ping | Run ping on all hosts in the inventory | ansible -m setup all | Run setup module againsta all hosts defined in hosts file | ansible | Show all details containint address | </tr>
ansible | Show distribution | </tr>
ansible local -s -K -m setup --tree /tmp/facts | Save json in a file | ansible | Get ip addresses | </tr>
ansible | Show information of the file | </tr>
ansible | Create a new folder. -s run as sudo, -K ask sudo pass | </tr>
ansible | Copy a file | </tr>
ansible | Install package | </tr>
ansible | Run shell command | </tr>
ansible | Shutdown vms | </tr>
ansible | Get status of process on group of servers | </tr>
</tbody>
</table>
|