mirror of
https://github.com/Infisical/ansible-collection.git
synced 2025-09-11 07:28:27 -07:00
fix: better env vars
This commit is contained in:
parent
7f992d3e59
commit
9a7d66f6c4
2 changed files with 5 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -4,3 +4,5 @@ inventory
|
|||
test.yml
|
||||
__pycache__
|
||||
infisical-vault-1.0.0.tar.gz
|
||||
|
||||
.vscode
|
|
@ -23,6 +23,7 @@ options:
|
|||
description: The Machine Identity Client ID used to authenticate
|
||||
env:
|
||||
- name: UNIVERSAL_AUTH_MACHINE_IDENTITY_CLIENT_ID
|
||||
- name: INFISICAL_UNIVERSAL_AUTH_CLIENT_ID
|
||||
required: True
|
||||
type: string
|
||||
version_added: 1.0.0
|
||||
|
@ -30,6 +31,7 @@ options:
|
|||
description: The Machine Identity Client Secret used to authenticate
|
||||
env:
|
||||
- name: UNIVERSAL_AUTH_MACHINE_IDENTITY_CLIENT_SECRET
|
||||
- name: INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET
|
||||
required: True
|
||||
type: string
|
||||
version_added: 1.0.0
|
||||
|
@ -75,6 +77,7 @@ vars:
|
|||
|
||||
class LookupModule(LookupBase):
|
||||
def run(self, terms, variables=None, **kwargs):
|
||||
|
||||
self.set_options(var_options=variables, direct=kwargs)
|
||||
if not HAS_INFISICAL:
|
||||
raise AnsibleError("Please pip install infisicalsdk to use the infisical_vault lookup module.")
|
||||
|
@ -128,7 +131,6 @@ class LookupModule(LookupBase):
|
|||
|
||||
return [{"value": secret.secretValue, "key": secret.secretKey}]
|
||||
except Exception as e:
|
||||
print(e)
|
||||
raise AnsibleError(f"Error fetching single secret {e}")
|
||||
|
||||
def get_all_secrets(self, client, project_id, environment="dev", path="/"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue