mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Auth method for the k8s lookup plugin now matches other modules (#37533)
This commit is contained in:
parent
ffd1200948
commit
716e170821
1 changed files with 5 additions and 1 deletions
|
@ -88,8 +88,12 @@ class KubernetesLookup(object):
|
||||||
self.kind = to_snake(self.kind)
|
self.kind = to_snake(self.kind)
|
||||||
self.helper = self.get_helper(self.api_version, self.kind)
|
self.helper = self.get_helper(self.api_version, self.kind)
|
||||||
|
|
||||||
|
auth_args = ('host', 'api_key', 'kubeconfig', 'context', 'username', 'password',
|
||||||
|
'cert_file', 'key_file', 'ssl_ca_cert', 'verify_ssl')
|
||||||
|
|
||||||
for arg in AUTH_ARG_SPEC:
|
for arg in AUTH_ARG_SPEC:
|
||||||
self.connection[arg] = kwargs.get(arg)
|
if arg in auth_args and kwargs.get(arg) is not None:
|
||||||
|
self.connection[arg] = kwargs.get(arg)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.helper.set_client_config(**self.connection)
|
self.helper.set_client_config(**self.connection)
|
||||||
|
|
Loading…
Add table
Reference in a new issue