Variable pointer

I have following situation
vars:
var1: test
var2: var1
tasks:

  • debug: msg=“{{ {{ var2 }} }}”

Exist some syntax to get “test” in debug msg?

- debug: msg="{{ hostvars[inventory_hostname][var2] }}"