-
Task
-
Resolution: Done
-
Normal
-
None
This will be needed by ansible-builder in order to construct a list of python / system level dependencies. We will need to inspect each collection for the information surfaced by #23
Proposed Solution
I'm unopinionated on the implementation details, but if it helps to know what I'm currently doing... the only way for me to get the data I need is via a private method in the Galaxy CLI:
from ansible import context from ansible.galaxy import Galaxy from ansible.galaxy.api import GalaxyAPI from ansible.galaxy.collection import _build_dependency_map context.CLIARGS = {'type': 'collection', 'ignore_certs': True} galaxy = Galaxy() api = GalaxyAPI(galaxy, 'default', 'https://galaxy.ansible.com') dependency_map = _build_dependency_map([('alancoding.deps', '*', None)], [], '/tmp/test', [api], False, False, False, False) print(dependency_map)