I have this hash: ```$isp_vlans = { 'isp1' =&g...
# puppet
g
I have this hash:
Copy code
$isp_vlans = {
    'isp1' => '10',
    'isp2' => '11',
}
I want to loop over that doing something like this:
Copy code
$_all_isps = {}

  $isp_vlans.each |$isp, $vlan| {
    $_all_isps[$isp] = {
      'vlan' => $vlan,
      'ip'   => lookup("inet${vlan}_ip", Optional[Stdlib::IP::Address::V4::Nosubnet], 'first', undef),
    }
  }
Doing so results in
Illegal attempt to assign via [index/key]. Not an assignable reference
pointed at
$_all_isps[$isp] = {
line. What am I doing wrong here? I am sure it is just a facepalm moment but I am not getting it today.