mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
resource overriden when conn_type='both' (#20206)
Simple change to avoid resource override when using conn_type == 'both'
This commit is contained in:
parent
4a594b3702
commit
d4449d082e
1 changed files with 1 additions and 1 deletions
|
@ -113,8 +113,8 @@ def _boto3_conn(conn_type=None, resource=None, region=None, endpoint=None, **par
|
||||||
client = boto3.session.Session(profile_name=profile).client(resource, region_name=region, endpoint_url=endpoint, **params)
|
client = boto3.session.Session(profile_name=profile).client(resource, region_name=region, endpoint_url=endpoint, **params)
|
||||||
return client
|
return client
|
||||||
else:
|
else:
|
||||||
resource = boto3.session.Session(profile_name=profile).resource(resource, region_name=region, endpoint_url=endpoint, **params)
|
|
||||||
client = boto3.session.Session(profile_name=profile).client(resource, region_name=region, endpoint_url=endpoint, **params)
|
client = boto3.session.Session(profile_name=profile).client(resource, region_name=region, endpoint_url=endpoint, **params)
|
||||||
|
resource = boto3.session.Session(profile_name=profile).resource(resource, region_name=region, endpoint_url=endpoint, **params)
|
||||||
return client, resource
|
return client, resource
|
||||||
|
|
||||||
boto3_inventory_conn = _boto3_conn
|
boto3_inventory_conn = _boto3_conn
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue