cancel
Showing results for 
Search instead for 
Did you mean: 
swider
Mission Specialist
Mission Specialist
  • 1,110 Views

ansible-navigator doc - doesn't print info

Hello,

maybe someone face the differences between ansible-navigator doc and ansible-navigator interactive version. I installed collections according to RH294 - Lab: Managing Linux Hosts and Using System Roles. And when I try to display info about redhat.rhel_system.storage it is not possible to display it wiith ansible-navigator doc ... It is visible only in interactive mode ansible-navigator :collection :redhat.rhel_system :storage. Is it normal? How to explain it?

 

And ansible.cfg is set properly (as a default) in this lab

 

Thank you for any answer or comments

 

 

Labels (1)
4 Replies
morbius
Flight Engineer
Flight Engineer
  • 993 Views

I haven't built Ansible collections myself, so take what I say here as an educated guess, but I believe that what you describe is the expected behavior.

 

Building a collection among other stuff requires some Python work to setup documentation, you have to prepare the documentation text in certain format, before running make doc to set it into a form that ansible doc can properly parse and display to the user. If that is not done, ansible doc doesn't have anything to show. The documentation of the ansible.builtin collection will always show as its documentation is a part of the package, but for other collections it depends on the maintainer if he is willing to do the work. Quite often, they will not bother, leaving instructions simply in README.md file. You can find instructions by reading that file or in the way you described.

I will warn you that on the exam I had a task where the provided role tarball did not even have description how the role is configured in the README file.

TravellingKiwi
Flight Engineer
Flight Engineer
  • 186 Views

The problem still exists. I was revising for the EX294 exam in a couple of days. And just wasted half a day on that exact issue in https://rol.redhat.com/rol/app/courses/rh294-9.0/pages/ch10s04

shashi01
Moderator
Moderator
  • 166 Views

Hi @TravellingKiwi 

Thanks for flagging this.

Could you please share the exact command you’re using, specify whether you're running it in interactive or stdout mode, and if possible, include a screenshot of the output or error you're encountering?

0 Kudos
TravellingKiwi
Flight Engineer
Flight Engineer
  • 147 Views

So, I was trying to use the reviews to prepare for the EX294 exam. So assuming exam conditions. No access to external docs etc. And so wanted to view the docs for redhat.rhel_system_roles.storage via ansible-navigator... Like you do for any module... Except ansible-navigator can't view the docs for a collection when using


ansible-navigator doc redhat.rhel_system_roles (Using interactive or stdout)

TravellingKiwi_0-1750792258416.png
In the failure, you get told where ansible-navigator is looking for docs. But it never looks in the collections where you're told to install (I have another bugbear about the install - you're also not told to install it from the tarball that's in the review-cr3 directory. Somewhat obvious after the fact, but if something like that came up in an exam, you'd assume the install was from galaxy... But of course that's not reachable in the lab either)

Apart from trying to read the raw files in the diirectory (You can navigate to them in ansible-navigator collections - but of course it doesn't format them for easy reading) I don't see a way to view them as actual docs that you can use as a reference

 

Join the discussion
You must log in to join this conversation.