ec2_group with port range?

Is there a way to define an ec2_group with port ranges, or maybe allow all ports for the security group? There is one example with a protocol of “all” which the code seems to map to -1, but if I use it, I get the following:

boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request


InvalidPermission.MalformedUnsupported IP protocol “-1” - supported: [tcp, udp, icmp]

I also tried to define the ports as None (which the code seemed to be doing for that “all” protocol, but I got a

InvalidParameterValueInvalid integer value None

Is there a work-around?

Saw you opened an RFE on this one: https://github.com/ansible/ansible/issues/6903

Not sure the API supports this or not – any users of this know?

Not sure if it matters, but the ec2_group help page does mention an “all” setting, it just doesn’t seem to be working.