title: How to define hash (dict) in ansible inventory file?
body: <p>I am able to define a hash(dict) like below in group_vars/all:</p>
  
  <pre><code>region_subnet_matrix:
    site1:
      region: "{{ aws_region }}"
      subnet: "subnet-xxxxxxx"
      zone: "{{aws_region}}a"
    site2:
      region: "{{ aws_region }}"
      subnet: "subnet-xxxxxxx"
      zone: "{{aws_region}}b"
  </code></pre>
  
  <p>but for the life of me, I could not figure out how to define it under hosts file</p>
  
  <pre><code>[all:vars]
  region_subnet_matrix="{
    site1:
      region: "{{ aws_region }}"
      subnet: "subnet-xxxxxxx"
      zone: "{{aws_region}}a"
    site2:
      region: "{{ aws_region }}"
      subnet: "subnet-xxxxxxx"
      zone: "{{aws_region}}b"
  }"
  </code></pre>
  
  <p>I know it was incorrect, but I don't know the right way. Can someone enlighten me, please?</p>