# with\_dict keys with "." was working in Ansible 1.9.4 but not with 2.1.0

**URL:** <https://forum.ansible.com/t/with-dict-keys-with-was-working-in-ansible-1-9-4-but-not-with-2-1-0/21245>\
**Category:** Ansible Project\
**Created:** [April 22, 2016, 2:55pm UTC](https://forum.ansible.com/t/with-dict-keys-with-was-working-in-ansible-1-9-4-but-not-with-2-1-0/21245 "2016-04-22T14:55:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Groten](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@Ryan\_Groten](https://forum.ansible.com/u/Ryan_Groten)\
**Post date:** [April 22, 2016, 2:55pm UTC](https://forum.ansible.com/t/with-dict-keys-with-was-working-in-ansible-1-9-4-but-not-with-2-1-0/21245/1 "2016-04-22T14:55:49Z")

</div>

When setting sysctl parameters I use the following variable:

`kernel_params: kernel.sem: 250 32000 100 128 kernel.shmmni: 4096 net.core.rmem_max: 4194304 net.core.rmem_default: 262144 net.core.wmem_max: 1048576 net.core.wmem_default: 262144 ...`

Then in my role I do the following:

`

- name: Change kernel parameters  
sysctl:  
name: “{{ item.key }}”  
value: “{{ item.value }}”  
state: present  
with\_dict: “{{ kernel\_params }}”  
`

In Ansible 1.9.4 this worked fine, but when I tried it with Ansible 2.1.0 I get the following error:

`TASK [db-sysprep : Change kernel parameters] **************************** [DEPRECATION WARNING]: Skipping task due to undefined Error, in the future this will be a fatal error.: 'kernel' is undefined. This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. fatal: [rlxpool51.corp.ads]: FAILED! => {"failed": true, "msg": "with_dict expects a dict"}`

It seems like the “.” in the key name is causing confusion, although I’m not really sure why (or how to fix it).

Thanks,  
Ryan
