--- - name: create limits.d-directory if it does not exist | sysctl-31a, sysctl-31b file: path: '/etc/security/limits.d' owner: 'root' group: 'root' mode: '0755' state: 'directory' when: 'os_security_kernel_enable_core_dump' - name: create sane limits.conf | sysctl-31a, sysctl-31b template: src: 'limits.conf.j2' dest: '/etc/security/limits.d/10.hardcore.conf' owner: 'root' group: 'root' mode: '0440' when: 'os_security_kernel_enable_core_dump'