1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Allow empty string for EC2 session token from env.

This commit is contained in:
Matt Clay 2017-05-03 09:59:05 +08:00
parent 425d35ef0f
commit 785bc93ff7

View file

@ -208,7 +208,8 @@ def get_aws_connection_info(module, boto3=False):
security_token = os.environ['AWS_SESSION_TOKEN']
elif 'EC2_SECURITY_TOKEN' in os.environ:
security_token = os.environ['EC2_SECURITY_TOKEN']
else:
if not security_token:
# in case security_token came in as empty string
security_token = None