1

I would like to know all the ways i can get information about ansible from CLI. The help sources i know of are:

1- these "few" man pages:

ansible (1)          
ansible-config (1)   
ansible-console (1)  
ansible-doc (1)      
ansible-galaxy (1)   
ansible-inventory (1)
ansible-playbook (1) 
ansible-pull (1)     
ansible-vault (1)    

2- the ansible-doc command that only provides help about modules.

What seems missing to me for example is information about playbook syntax. If i want to verify the syntax of a loop or to see what loop mechanisms are available ...

1 Answer 1

2

Documentation for ansible is available on their website, rooted at https://docs.ansible.com/ansible/latest/index.html

You can navigate from there to, for example, the page on playbook overview or loop mechanisms.

If you run ansible from source, you can make a local copy of the documentation in html format by descending into docs/docsite and issuing make viewdocs (requires sphinx installed on your system).

3
  • I am perfectly aware of ansible's online documentation, my question is about how to locate such information from "CLI". Same as for modules it is much easier to do ansible-doc module_name then to have to go online (assuming you have internet access) and search the documentation website Commented Dec 12, 2017 at 14:08
  • 1
    As I note in the third paragraph, you don't need internet access: the source for docs.ansible.com is all included in the distribution, so you can read it locally via a graphical or, if you prefer, text-based html reader. Ansible clearly favors web-oriented documentation: each of the relatively brief man pages ends with "extensive documentation available at...". Commented Dec 12, 2017 at 15:36
  • 1
    I will be taking redhat's ansible certification exam in a few weeks, there will be definitely no internet connection available, I assume ansible will be installed from the standard repository packages. When i prepare for exams i usually do not count on memorizing materials by heart i rather try to always know where to look for the info when i need it. With ansible, i can't figure out where to look for information about magic-variables, loops, conditionals ... If your method still applies in exam conditions can you elaborate? , i don't suppose typing make viewdocs in the terminal will be enough Commented Dec 16, 2017 at 9:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .