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

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7aa60f4f-202f-4cac-9102-b6316191dc51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to