cancel
Showing results for 
Search instead for 
Did you mean: 
RMB
Mission Specialist
Mission Specialist
  • 592 Views

How to search for a word in the documentation in "ansible-navigator doc"

Jump to solution

Hello everyone,

I'm preparing for the exam. And using the command "ansible-navigator doc ansible.builtin.lineinfile" to search for the documentation of the lineinfile module, I would like to search for the examples in the doc, but I see that you can't use the shortcut '/examples' or '/EXAMPLES', as you can use the other command "ansible-doc".

Inside 'ansible-navigator doc' and then ':help' I see that you can use a filter, like ':f examples' but it doesn't find anything, it's like it doesn't execute anything.

Could someone tell me how to search for a word in the documentation in "ansible-navigator doc"?

Thanks!

2 Solutions

Accepted Solutions
poleary
Cadet
Cadet
  • 577 Views

you have a couple of options:
1. use the stdout mode for ansible-navigator (-m stdout). This will bring up the documentation in your preferred pager app. You can then use normal search methods like / to find keywords.

2. generally the examples are at or near the end of the pages. if not using stdout go to the bottom for the examples; as is the case with lineinfile you mentioned.

I personally prefer the ansible-navigator doc -m stdout as it allows you to use your preferred pager and familiar with its functions already.

View solution in original post

RMB
Mission Specialist
Mission Specialist
  • 261 Views

Hello.

I have already found the solution ! and it is a really good one

To go directly to the examples at the bottom of ansible-navigator interface we can use this:

:{{ examples }}     and then press [ENTER]

RMB_0-1727864094272.png

RMB_1-1727864149817.png

 

I hope this helps you.

Regards,

Roberto

View solution in original post

0 Kudos
3 Replies
poleary
Cadet
Cadet
  • 578 Views

you have a couple of options:
1. use the stdout mode for ansible-navigator (-m stdout). This will bring up the documentation in your preferred pager app. You can then use normal search methods like / to find keywords.

2. generally the examples are at or near the end of the pages. if not using stdout go to the bottom for the examples; as is the case with lineinfile you mentioned.

I personally prefer the ansible-navigator doc -m stdout as it allows you to use your preferred pager and familiar with its functions already.

RMB
Mission Specialist
Mission Specialist
  • 454 Views

I prefer the 'ansible-navigator doc -m stdout' too and then '/ EXAMPLES:'
Thanks.

RMB
Mission Specialist
Mission Specialist
  • 262 Views

Hello.

I have already found the solution ! and it is a really good one

To go directly to the examples at the bottom of ansible-navigator interface we can use this:

:{{ examples }}     and then press [ENTER]

RMB_0-1727864094272.png

RMB_1-1727864149817.png

 

I hope this helps you.

Regards,

Roberto

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