title: Ansible with_dict expects a dict
body: <p>I know this question has been asked many times before but I must be missing something here!</p>
  
  <p>This is a minimal playbook to reproduce the issue.</p>
  
  <p>Here is the playbook:</p>
  
  <pre><code>---
  - hosts:
      - localhost
    gather_facts: false
    vars:
      zones_hash:
        location1:
          id: 1
          control_prefix: '10.1.254'
          data_prefix: '10.1.100'
        location2:
          id: 2
          control_prefix: '10.2.254'
          data_prefix: '10.2.100'
    tasks:
      - name: "test1"
        debug: var="zones_hash"
  
      - name: "test2"
        debug: var="item"
        with_dict:
        - "{{ zones_hash }}"
  </code></pre>
  
  <p>Here is the output:</p>
  
  <pre><code>$ ansible --version
  ansible 2.3.1.0
    config file = /home/configs/_ansible/ansible.cfg
    configured module search path = Default w/o overrides
    python version = 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
  $ ansible-playbook playbook.yml
  
  PLAY [localhost] *******************************************************************************
  
  TASK [test1] ***********************************************************************************
  ok: [localhost] =&gt; {
      "zones_hash": {
          "location1": {
              "control_prefix": "10.1.254",
              "data_prefix": "10.1.100",
              "id": 1
          },
          "location2": {
              "control_prefix": "10.2.254",
              "data_prefix": "10.2.100",
              "id": 2
          }
      }
  }
  
  TASK [test2] ***********************************************************************************
  fatal: [localhost]: FAILED! =&gt; {"failed": true, "msg": "with_dict expects a dict"}
  
  PLAY RECAP *************************************************************************************
  localhost                  : ok=1    changed=0    unreachable=0    failed=1
  </code></pre>
  
  <p>I would expect the item variable printed in task2 to contain (for example):</p>
  
  <pre><code>key: location1
  value: {
    id: 1
    control_prefix: '10.1.254'
    data_prefix: '10.1.100'
  }
  </code></pre>
  
  <p>What are we missing?</p>