cancel
Showing results for 
Search instead for 
Did you mean: 
gmahns
Cadet
Cadet
  • 2,220 Views

Ansible Modules

Jump to solution

what is the best way to find modules in Ansible from the CLI. I can list all the modules but there are quite a few. I have tried grep, but it seems to be not that effective, especially when you are not sure exactly what to search for. Are you able to list module types, like you see online at docs.ansible.com and then list below there?

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
bonnevil
Starfighter Starfighter
Starfighter
  • 2,196 Views

In my experience grep has been the best way to do it from the CLI. The ansible-doc command can look up things besides modules (for example, with -t inventory for inventory plugins and -t lookup for lookup plugins; -t module just happens to be the default) which is probably why it doesn't have a ton of flags for metadata matching specific categories of modules.  Given how many modules are included with Ansible now, it'd be nice if it did have a feature like that.  If it does, I'm not aware of it.

View solution in original post

2 Replies
Razique
Flight Engineer Flight Engineer
Flight Engineer
  • 2,201 Views

Hey @gmahns this is a good question. I have used grep as well in the past. @bonnevil would you know how to quickly locate a module when running ansible-doc -l?

0 Kudos
bonnevil
Starfighter Starfighter
Starfighter
  • 2,197 Views

In my experience grep has been the best way to do it from the CLI. The ansible-doc command can look up things besides modules (for example, with -t inventory for inventory plugins and -t lookup for lookup plugins; -t module just happens to be the default) which is probably why it doesn't have a ton of flags for metadata matching specific categories of modules.  Given how many modules are included with Ansible now, it'd be nice if it did have a feature like that.  If it does, I'm not aware of it.

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