From 316ccb0e65e14d18f855a79ffd46e261c4d85751 Mon Sep 17 00:00:00 2001 From: Shobhit Srivastava Date: Tue, 4 Aug 2015 12:52:56 +0530 Subject: [PATCH] checking remote_group_id while comparing os_security_group_rule --- lib/ansible/modules/cloud/openstack/os_security_group_rule.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/cloud/openstack/os_security_group_rule.py b/lib/ansible/modules/cloud/openstack/os_security_group_rule.py index bc0ae597930..e15472e105d 100644 --- a/lib/ansible/modules/cloud/openstack/os_security_group_rule.py +++ b/lib/ansible/modules/cloud/openstack/os_security_group_rule.py @@ -215,12 +215,14 @@ def _find_matching_rule(module, secgroup): remote_ip_prefix = module.params['remote_ip_prefix'] ethertype = module.params['ethertype'] direction = module.params['direction'] + remote_group_id = module.params['remote_group'] for rule in secgroup['security_group_rules']: if (protocol == rule['protocol'] and remote_ip_prefix == rule['remote_ip_prefix'] and ethertype == rule['ethertype'] and direction == rule['direction'] + and remote_group_id == rule['remote_group_id'] and _ports_match(protocol, module.params['port_range_min'], module.params['port_range_max'],