From c5433d9742e63159be13050e01449d2c40571b5d Mon Sep 17 00:00:00 2001 From: David Hummel Date: Mon, 23 Dec 2013 15:57:47 -0500 Subject: [PATCH] Check for group_name and cidr_ip. --- library/cloud/ec2_group | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/cloud/ec2_group b/library/cloud/ec2_group index 85005224f6f..63850efb789 100644 --- a/library/cloud/ec2_group +++ b/library/cloud/ec2_group @@ -211,6 +211,8 @@ def main(): ip = None if 'group_id' in rule and 'cidr_ip' in rule: module.fail_json(msg="Specify group_id OR cidr_ip, not both") + elif 'group_name' in rule and 'cidr_ip' in rule: + module.fail_json(msg="Specify group_name OR cidr_ip, not both") elif 'group_id' in rule and 'group_name' in rule: module.fail_json(msg="Specify group_id OR group_name, not both") elif 'group_id' in rule: