Skip to main content

Ansible Collection Path Printer

Project description

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:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansible_collection_path-0.5.0.tar.gz (34.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansible_collection_path-0.5.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file ansible_collection_path-0.5.0.tar.gz.

File metadata

  • Download URL: ansible_collection_path-0.5.0.tar.gz
  • Upload date:
  • Size: 34.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ansible_collection_path-0.5.0.tar.gz
Algorithm Hash digest
SHA256 b58723cb9065ad99e0642086997dbe738b9dcb38bf0a49d1704d347514f9bd5e
MD5 6e6c38e506b630ef782df931c2472bb0
BLAKE2b-256 a5fdc67864e870657c302ee60019eb692c245d8d82c52ada9f01a91c15e8d41b

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansible_collection_path-0.5.0.tar.gz:

Publisher: publish.yml on andy-maier/ansible-collection-path

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansible_collection_path-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ansible_collection_path-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32f9443e334a4336f30bc8fe55845b75f0714b345fec40455d1db3d449f5ade9
MD5 c1684c229defb127898cb488dcb8704c
BLAKE2b-256 4fbcc40262cd1c02a7e399a956865cfae9f11049c4e0bc65573de77ec05413cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansible_collection_path-0.5.0-py3-none-any.whl:

Publisher: publish.yml on andy-maier/ansible-collection-path

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page