- name:Change various sysctl-settings, look at the sysctl-vars file for documentation
sysctl:
name:'{{ item.key }}'
value:'{{ item.value }}'
sysctl_set:yes
state:present
reload:yes
ignoreerrors:yes
with_dict:'{{ sysctl_config }}'
- name:Change various sysctl-settings on rhel6-hosts or older, look at the sysctl-vars file for documentation
sysctl:
name:'{{ item.key }}'
value:'{{ item.value }}'
state:present
reload:yes
ignoreerrors:yes
with_dict:'{{ sysctl_rhel_config }}'
when:((ansible_distribution == 'RedHat' or ansible_distribution == 'Fedora' or ansible_distribution == 'CentOS') and ansible_distribution_major_version < '7') or ansible_distribution == 'Amazon'