From 548ab163f5f125c725ef56156bf82e7e27c11cd6 Mon Sep 17 00:00:00 2001 From: nitzmahone Date: Fri, 24 Apr 2015 17:33:00 -0700 Subject: [PATCH] Added choice validation for state arg fixes traceback on invalid state arg --- lib/ansible/modules/cloud/amazon/ec2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2.py b/lib/ansible/modules/cloud/amazon/ec2.py index 33ed9cf6b5..1affd384a7 100755 --- a/lib/ansible/modules/cloud/amazon/ec2.py +++ b/lib/ansible/modules/cloud/amazon/ec2.py @@ -1195,7 +1195,7 @@ def main(): instance_profile_name = dict(), instance_ids = dict(type='list', aliases=['instance_id']), source_dest_check = dict(type='bool', default=True), - state = dict(default='present'), + state = dict(default='present', choices=['present', 'absent', 'running', 'stopped']), exact_count = dict(type='int', default=None), count_tag = dict(), volumes = dict(type='list'),