title: Ansible check if dictionary exists
body: <p>i want to deploy additional <code>mysql</code> users - if set.
  So i am using a dictionary. E.g.:</p>
  
  <pre><code>mysql_additional_users:
    user1:
      password: mysecretpass
      privs: "database1.*:ALL"
  </code></pre>
  
  <p>which works fine, as long as the dict is defined.
  If not - it fails.</p>
  
  <p>Although i tried to determine, if the dict is defined:</p>
  
  <pre><code>  - name: create additional mysql users
      mysql_user: name={{ item.key }} password={{ item.value.password }} priv={{ item.value.privs }} state=present      
      with_dict: "{{ mysql_additional_users }}"
      when: mysql_additional_users is defined 
  </code></pre>
  
  <p>But i always get an error:</p>
  
  <pre><code>fatal: [&lt;hostname&gt;]: FAILED! =&gt; {"failed": true, "msg": "ERROR! 'mysql_additional_users' is undefined"}
  </code></pre>
  
  <p>Any ideas ?</p>