6. Ansible Commmands¶
6.1. Ansible Binaries¶
ansibleansible-playbookansible-docansible-galaxy(later)ansible-vault(later)ansible-consoleansible-inventory
6.2. Ansible Documentation¶
Get the documentation of a module.
- with the
ansible-docbinary - online (http://docs.ansible.com)
# show all modules
ansible-doc -l
# show documentation of the easy_install module
ansible-doc easy_install
6.2.1. Links¶
6.3. Ad-Hoc Commands¶
- run some commands or modules on a host
- used for quick tasks without writing a playbook
# 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)