A way to determine which ansible collections are used in many playbooks as opposed to listing the installed collections on a controller?

I have a decent amount of playbooks in an Ansible Runner Project and many tend to use some standard collections available from ansible-galaxy.

I wish to setup a requirements.txt file so that any python package that is a dependency for collections can be created in order to create VMs for my controller.

E.g. community.docker depends on docker python package, I tend to use blowfish cryptographic algorithm hence I need to install passlib etc.

I was wondering if there is some way to determine which collections are used in these sets of playbooks?

1 Like

Its hard to tell by just looking at the playbook. You should look in the git repository and look at the collections directory. If using custom made images for EE then you can see with ansible-navigator.