diff --git a/configure_linux.yml b/configure_linux.yml index 46a99b2..90c0fc2 100644 --- a/configure_linux.yml +++ b/configure_linux.yml @@ -3,17 +3,13 @@ user: root tasks: - - name: add script blob to disable THP on boot - blockinfile: - path: /etc/rc.local - insertbefore: "exit 0" - block: | - if test -f /sys/kernel/mm/transparent_hugepage/enabled; then - echo never > /sys/kernel/mm/transparent_hugepage/enabled - fi - if test -f /sys/kernel/mm/transparent_hugepage/defrag; then - echo never > /sys/kernel/mm/transparent_hugepage/defrag - fi + - name: disable THP on boot via grub + lineinfile: + path: /etc/default/grub + regexp: '^GRUB_CMDLINE_LINUX_DEFAULT=' + line: 'GRUB_CMDLINE_LINUX_DEFAULT="quiet splash transparent_hugepage=never"' + notify: update grub + - name: set splunk ulimit fd blockinfile: path: /etc/security/limits.d/splunk.conf @@ -22,4 +18,17 @@ splunk hard nofile 65535 splunk soft nofile 65535 + - name: tell PAM to read limits + lineinfile: + path: /etc/pam.d/common-session + insertbefore: '# end of pam-auth-update config' + line: session required pam_limits.so + - name: tell PAM to read limits non-interactive + lineinfile: + path: /etc/pam.d/common-session-noninteractive + insertbefore: '# end of pam-auth-update config' + line: session required pam_limits.so + handlers: + - name: update grub + shell: /usr/sbin/update-grub