"network::route" needs to check the length of the arrays
Opened this issue · 0 comments
KedneckInc commented
I have route information in yaml, in a format similar to this, but spread across more than one level, so I have to do a 'merge' to get all the information in one spot.
project::network::config:
... several other network config sets ...
networkname:
... other network configuration parameters ...
routes:
ipaddress:
- 10.10.0.0
- 10.20.30.0
netmask:
- 255.255.0.0
- 255.255.255.0
gateway:
- 10.10.10.1
- 10.10.10.1
Unfortunately, every merge that I've attempted uniques the gateway array so that the final output in the route-* file is like this:
ADDRESS0=10.10.0.0
ADDRESS1=10.20.30.0
NETMASK0=255.255.0.0
NETMASK1=255.255.255.0
GATEWAY0=10.10.10.1
At the least, 'network::route' needs to check the length of the arrays it is given, to ensure that they're the same length, to avoid generating a bogus route file.