From 0494dced3ad369765b54dc677cc987e1c825403f Mon Sep 17 00:00:00 2001 From: Michael Moussa Date: Tue, 12 Apr 2016 17:32:12 -0400 Subject: [PATCH] Fixes read replica create BC break (#3365) --- lib/ansible/modules/cloud/amazon/rds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/rds.py b/lib/ansible/modules/cloud/amazon/rds.py index 7b3e9ffdb6..c8199bc377 100755 --- a/lib/ansible/modules/cloud/amazon/rds.py +++ b/lib/ansible/modules/cloud/amazon/rds.py @@ -1080,7 +1080,7 @@ def main(): module.fail_json(msg="Region not specified. Unable to determine region from EC2_REGION.") # set port to per db defaults if not specified - if module.params['port'] is None and module.params['command'] in ['create', 'replicate']: + if module.params['port'] is None and module.params['db_engine'] is not None and module.params['command'] == 'create': if '-' in module.params['db_engine']: engine = module.params['db_engine'].split('-')[0] else: