This actually isn't working... if I have this: ```...
# puppet
g
This actually isn't working... if I have this:
Copy code
$vlan_30_additional_addresses = [
  "10.130.7.50/18",
  "10.130.7.52/18",
  "10.130.7.54/18",
]

$vlan = '30'

$some_hash = {
  'additional_addresses' => assert_type(Array[Stdlib::IP::Address::V4::CIDR], getvar("vlan_${vlan}_additional_addresses")),
}

notify { "hash containing vlan_30_additional_addresses":
  message => to_json_pretty($some_hash)
}
I get
Copy code
Notice: {
  "additional_addresses": [
    "10.130.7.50/18",
    "10.130.7.52/18",
    "10.130.7.54/18"
  ]
}
like one would expect. But, if
$vlan_30_additional_addresses
is a class param it doesn't seems to work right. Every time I get undef instead of the value set in the param, be it one from hiera or the param's default. Any idea what I am missing here? FWIW this is using the
getvar()
from stdlib 5.2.0 on Puppet 4.