Providing the following input to split_ip_by_version, you'll get all failures.
$input = [ '10.0.0.0/8,192.168.0.0/24', '172.16.0.0/12' ]
$output = split_ip_by_version($input)
size($output['other']) # == 1
size($output['4']) # == 1
size($output['6']) # == 1
We should be smart enough to break up the the lists, much like we flatten embedded arrays.
This comes up in hiera, when we do something like:
---
some_network: '10.0.0.0/8'
our_networks: '192.168.0.0/24,'172.16.0.0/12'
profile::firewall::rules:
'some rule':
protocol: tcp
source:
- "%{hiera('some_network')}"
- "%{hiera('our_networks')}"