Ansible Collection Path Printer
ansible-collection-path prints the install directory of an Ansible collection:
For example:
$ ansible-collection-path mynamespace.mycollection
/Users/myuser/.ansible/collections/ansible_collections/mynamespace.mycollection
The install directory is determined using the ansible-galaxy collection list
command, so your existing configuration for Ansible collection paths from
Ansible configuration files and environment variables is used.
Use cases
The most prominent use case for such a functionality is the installation of
dependent Python packages: If your Ansible collection has dependencies on
Python packages, you can include a requirements.txt file with the collection
and instruct your collection users to use the ansible-collection-path command
to get the Python dependencies installed after installing the collection:
ansible-galaxy collection install <NAMESPACE>.<COLLECTION>
pip install $(ansible-collection-path <NAMESPACE>.<COLLECTION>)/requirements.txt
Including a requirements.txt file into your collection is easy: Have the file
in the main directory of your collection repo and do not include it in the
build_ignore property in your galaxy.yml file.
Installation
If you want to install the package into a virtual Python environment:
$ pip install ansible-collection-path
Otherwise, you can also install it without depending on a virtual Python environment:
-
If not yet available, install the "pipx" command as described in https://pipx.pypa.io/stable/installation/.
-
Then, install the package using "pipx":
$ pipx install ansible-collection-path
Reporting issues
If you encounter a problem, please report it as an issue on GitHub.
License
This package is licensed under the Apache 2.0 License.
Metadata
Release files for ansible-collection-path 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ansible_collection_path-0.5.0.tar.gz | 34.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ansible_collection_path-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.8 kB
Release files / ansible_collection_path-0.5.0.tar.gz
| Download URL | ansible_collection_path-0.5.0.tar.gz |
|---|---|
| Size | 34.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b58723cb9065ad99e0642086997dbe738b9dcb38bf0a49d1704d347514f9bd5e
|
|
BLAKE2b-256 checksum How to use checksums |
a5fdc67864e870657c302ee60019eb692c245d8d82c52ada9f01a91c15e8d41b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2025.
Transparency logRelease files / ansible_collection_path-0.5.0-py3-none-any.whl
| Download URL | ansible_collection_path-0.5.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32f9443e334a4336f30bc8fe55845b75f0714b345fec40455d1db3d449f5ade9
|
|
BLAKE2b-256 checksum How to use checksums |
4fbcc40262cd1c02a7e399a956865cfae9f11049c4e0bc65573de77ec05413cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2025.
Transparency log