mirror of
https://github.com/Infisical/ansible-collection.git
synced 2025-08-15 10:31:48 -07:00
add read_secret lookup function
This commit is contained in:
parent
1eedeb42ee
commit
e226a6b1f7
6 changed files with 162 additions and 30 deletions
39
README.md
39
README.md
|
@ -1,3 +1,38 @@
|
|||
# Ansible Collection - maidul98.infisical
|
||||
# Infisical Collection
|
||||
This Ansible Infisical collection includes a variety of Ansible content to help automate the management of Infisical services. This collection is maintained by the Infisical team.
|
||||
|
||||
## Ansible version compatibility
|
||||
|
||||
Tested with the Ansible Core >= 2.12.0 versions, and the current development version of Ansible. Ansible Core versions prior to 2.12.0 have not been tested.
|
||||
|
||||
## Python version compatibility
|
||||
|
||||
This collection depends on the Infisical SDK for Python.
|
||||
|
||||
Requires Python 3.7 or greater.
|
||||
|
||||
## Installing this collection
|
||||
|
||||
You can install the Infisical collection with the Ansible Galaxy CLI:
|
||||
|
||||
ansible-galaxy collection install maidul98.infisical_vault
|
||||
|
||||
The python module dependencies are not installed by `ansible-galaxy`. They can
|
||||
be manually installed using pip:
|
||||
|
||||
pip install infisical
|
||||
|
||||
## Using this collection
|
||||
|
||||
You can either call modules by their Fully Qualified Collection Name (FQCN), such as `infisical.vault.read_secrets`, or you can call modules by their short name if you list the `infisical.vault` collection in the playbook's `collections` keyword:
|
||||
|
||||
```yaml
|
||||
---
|
||||
vars:
|
||||
read_all_secrets_within_scope: "{{ lookup('infisical.vault.read_secrets', token='<>', path='/', env_slug='dev', url='https://spotify.infisical.com') }}"
|
||||
# [{ "key": "HOST", "value": "google.com" }, { "key": "SMTP", "value": "gmail.smtp.edu" }]
|
||||
|
||||
read_secret_by_name_within_scope: "{{ lookup('infisical.vault.read_secrets', token='<>', path='/', env_slug='dev', name='HOST', url='https://spotify.infisical.com') }}"
|
||||
# [{ "key": "HOST", "value": "google.com" }]
|
||||
```
|
||||
|
||||
Documentation for the collection.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue