for loop in template gives error undefined variables: list object has no element

I believe you need to make 2 changes:

loop.index instead of usenet_servers[server].loop.index

And just use server instead usenet_servers[server] everywhere else. server isn’t the index, it is the actual hash/dict.