diff --git a/library/cloud/ec2_group b/library/cloud/ec2_group index bed8978e82..1ebc69efeb 100644 --- a/library/cloud/ec2_group +++ b/library/cloud/ec2_group @@ -253,7 +253,7 @@ def main(): if target_group_created: changed = True - if rule['proto'] == 'all': + if rule['proto'] in ('all', '-1', -1): rule['proto'] = -1 rule['from_port'] = None rule['to_port'] = None @@ -293,7 +293,7 @@ def main(): if target_group_created: changed = True - if rule['proto'] == 'all': + if rule['proto'] in ('all', '-1', -1): rule['proto'] = -1 rule['from_port'] = None rule['to_port'] = None