mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Allow empty string for EC2 session token from env.
This commit is contained in:
@@ -208,7 +208,8 @@ def get_aws_connection_info(module, boto3=False):
|
|||||||
security_token = os.environ['AWS_SESSION_TOKEN']
|
security_token = os.environ['AWS_SESSION_TOKEN']
|
||||||
elif 'EC2_SECURITY_TOKEN' in os.environ:
|
elif 'EC2_SECURITY_TOKEN' in os.environ:
|
||||||
security_token = os.environ['EC2_SECURITY_TOKEN']
|
security_token = os.environ['EC2_SECURITY_TOKEN']
|
||||||
else:
|
|
||||||
|
if not security_token:
|
||||||
# in case security_token came in as empty string
|
# in case security_token came in as empty string
|
||||||
security_token = None
|
security_token = None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user