Ansible Commmands """"""""""""""""" Ansible Binaries ================ * ``ansible`` * ``ansible-playbook`` * ``ansible-doc`` * ``ansible-galaxy`` (later) * ``ansible-vault`` (later) * ``ansible-console`` * ``ansible-inventory`` Ansible Documentation ===================== Get the documentation of a module. * with the ``ansible-doc`` binary * online (http://docs.ansible.com) .. code-block:: bash # show all modules ansible-doc -l # show documentation of the easy_install module ansible-doc easy_install Links ----- * http://docs.ansible.com/ansible/index.html Ad-Hoc Commands =============== * run some commands or modules on a host * used for quick tasks without writing a playbook .. code-block:: bash # simple command ansible -a "/bin/echo hello" all # "ping" all hosts ansible -m ping all .. hint:: **all** stands for all hosts in the inventory file. .. hint:: Ad-Hoc commands can be useful to get informations (e.g is a package installed, is a user available) Links ----- * http://docs.ansible.com/ansible/intro_adhoc.html Ansible Playbook ================ Run a playbook .. code-block:: bash # run the playbook play.yml ansible-playbook play.yml