Opengear IP Assignments

I am trying to write a playbook to configure the Opengear Console 7196. This is a console with 96 ports that each need to be assigned an IP address. Each port will be assigned an IP address sequentially. The IP address can be anything and will be passed as a variable via the command line. The only constraint here is that the IP addresses must be assigned sequentially. But I have no idea how to use Ansible to do this especially when the mask is something higher than 24. Can someone point me in the right direction, please?