Suppose I have a template file, containing, among others, a /24 IP range:
...
podCIDR: 192.168.<x>.0/24
...
Now, using Ansible, I want to render this template, with a running number from 1 to the number of hosts in my inventory, so that each host will have a different range. The first will have 192.168.1.0/24
, the second 192.168.2.0/24
, etc.
How do I do this?