accessing nested variables in dictionary that contains ansible-variable as key

Hey I’m wondering how I should point to variables nested like shown below.
if it helps, the playbook I’m writing doesn’t need to work with multiple hosts at once

The variable cannot be re-structured since it’s being used by another ansible-module I do not maintain

how I should point to variables nested like shown below.

  vm_specs:
    "{{ hostname }}":
      dns1: 1.1.1.1
      dns2: 2.2.2.2

For example,

  > cat playbook.yml
  - hosts: localhost
    vars:
      vm_specs:
        "{{ hostname }}":
          dns1: 1.1.1.1
          dns2: 2.2.2.2
    tasks:
      - set_fact:
          my_hostname: "{{ vm_specs.keys()|first }}"
          my_dns: "{{ vm_specs.values()|first }}"
      - debug:
          var: my_hostname
      - debug:
          var: my_dns

gives

  > ansible-playbook playbook.yml -e hostname=test

  TASK [debug]