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:
-
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b58723cb9065ad99e0642086997dbe738b9dcb38bf0a49d1704d347514f9bd5e
|
|
| MD5 |
6e6c38e506b630ef782df931c2472bb0
|
|
| BLAKE2b-256 |
a5fdc67864e870657c302ee60019eb692c245d8d82c52ada9f01a91c15e8d41b
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ansible_collection_path-0.5.0.tar.gz -
Subject digest:
b58723cb9065ad99e0642086997dbe738b9dcb38bf0a49d1704d347514f9bd5e - Sigstore transparency entry: 669939929
- Sigstore integration time:
-
Permalink:
andy-maier/ansible-collection-path@8baa5eaca02271e3e6d202ee110c0f67f8cbdded -
Branch / Tag:
refs/tags/0.5.0 - Owner: https://github.com/andy-maier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8baa5eaca02271e3e6d202ee110c0f67f8cbdded -
Trigger Event:
push
-
Statement type:
File details
Details for the file ansible_collection_path-0.5.0-py3-none-any.whl.
File metadata
- Download URL: ansible_collection_path-0.5.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32f9443e334a4336f30bc8fe55845b75f0714b345fec40455d1db3d449f5ade9
|
|
| MD5 |
c1684c229defb127898cb488dcb8704c
|
|
| BLAKE2b-256 |
4fbcc40262cd1c02a7e399a956865cfae9f11049c4e0bc65573de77ec05413cc
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ansible_collection_path-0.5.0-py3-none-any.whl -
Subject digest:
32f9443e334a4336f30bc8fe55845b75f0714b345fec40455d1db3d449f5ade9 - Sigstore transparency entry: 669939955
- Sigstore integration time:
-
Permalink:
andy-maier/ansible-collection-path@8baa5eaca02271e3e6d202ee110c0f67f8cbdded -
Branch / Tag:
refs/tags/0.5.0 - Owner: https://github.com/andy-maier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8baa5eaca02271e3e6d202ee110c0f67f8cbdded -
Trigger Event:
push
-
Statement type: