Skip to content

Commit

Permalink
updated the ini keys in lookup plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ramavenkata-loya committed May 16, 2024
1 parent 29f25d6 commit 560c17b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions plugins/lookup/conjur_variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
required: False
ini:
- section: conjur,
key: conjur_appliance_url
key: appliance_url
vars:
- name: conjur_appliance_url
env:
Expand All @@ -74,7 +74,7 @@
required: False
ini:
- section: conjur,
key: conjur_authn_login
key: authn_login
vars:
- name: conjur_authn_login
env:
Expand All @@ -85,7 +85,7 @@
required: False
ini:
- section: conjur,
key: conjur_account
key: account
vars:
- name: conjur_account
env:
Expand All @@ -96,7 +96,7 @@
required: False
ini:
- section: conjur,
key: conjur_authn_api_key
key: authn_api_key
vars:
- name: conjur_authn_api_key
env:
Expand All @@ -107,7 +107,7 @@
required: False
ini:
- section: conjur,
key: conjur_cert_file
key: cert_file
vars:
- name: conjur_cert_file
env:
Expand All @@ -118,7 +118,7 @@
required: False
ini:
- section: conjur,
key: conjur_authn_token_file
key: authn_token_file
vars:
- name: conjur_authn_token_file
env:
Expand Down Expand Up @@ -148,7 +148,6 @@
from ansible.plugins.lookup import LookupBase
from base64 import b64encode
from netrc import netrc
from os import environ
from time import sleep
from ansible.module_utils.six.moves.urllib.parse import quote
from ansible.module_utils.urls import urllib_error
Expand Down Expand Up @@ -445,7 +444,4 @@ def get_var_value(self, key):
except KeyError:
raise AnsibleError("{0} was not defined in configuration".format(key))

if not variable_value and key != "conjur_authn_token_file":
raise AnsibleError("The value of the {0} variable is not set".format(key))

return variable_value

0 comments on commit 560c17b

Please sign in to comment.