From d252e7c08f1653ad943b2d1885da2b5fbc4cc260 Mon Sep 17 00:00:00 2001 From: whiter Date: Fri, 15 May 2015 15:35:23 +1000 Subject: [PATCH] Fix for issue #1332 - when instance is has finished deleting and get_db_instance returns None, exit gracefully --- lib/ansible/modules/cloud/amazon/rds.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/cloud/amazon/rds.py b/lib/ansible/modules/cloud/amazon/rds.py index 34f45218f0a..5b152ace6b2 100755 --- a/lib/ansible/modules/cloud/amazon/rds.py +++ b/lib/ansible/modules/cloud/amazon/rds.py @@ -624,6 +624,8 @@ def await_resource(conn, resource, status, module): if resource.name is None: module.fail_json(msg="Problem with instance %s" % resource.instance) resource = conn.get_db_instance(resource.name) + if resource is None: + break return resource