From 32397531d0293dab7a92308b1a251ba7fade2d2b Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Wed, 10 Oct 2018 22:57:58 +0530 Subject: [PATCH] lambda: fix unboundLocalError in lambda (#46729) This fix initializes current_version to None so that module proceeds in check mode. Fixes: #46654 Signed-off-by: Abhijeet Kasurde --- lib/ansible/modules/cloud/amazon/lambda.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/cloud/amazon/lambda.py b/lib/ansible/modules/cloud/amazon/lambda.py index 15d0c09bfc3..623f6545fd1 100644 --- a/lib/ansible/modules/cloud/amazon/lambda.py +++ b/lib/ansible/modules/cloud/amazon/lambda.py @@ -554,6 +554,7 @@ def main(): 'SecurityGroupIds': vpc_security_group_ids}}) # Finally try to create function + current_version = None try: if not check_mode: response = client.create_function(**func_kwargs)