From f3d41cdb06244975001ddf43a51366286c7435e8 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 13 Jan 2015 22:39:20 -0800 Subject: [PATCH] Potential fix for 640 --- lib/ansible/modules/cloud/amazon/elasticache.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/elasticache.py b/lib/ansible/modules/cloud/amazon/elasticache.py index c1846f525a8..4e76d593cc9 100644 --- a/lib/ansible/modules/cloud/amazon/elasticache.py +++ b/lib/ansible/modules/cloud/amazon/elasticache.py @@ -357,7 +357,9 @@ class ElastiCacheManager(object): 'modifying': 'available', 'deleting': 'gone' } - + if self.status == awaited_status: + # No need to wait, we're already done + return if status_map[self.status] != awaited_status: msg = "Invalid awaited status. '%s' cannot transition to '%s'" self.module.fail_json(msg=msg % (self.status, awaited_status))