---

# can be configured by tuned profile sap-hana, entry "transparent_hugepages=never"
- name: Disable transparent hugepages at boot time
  lineinfile:
    path: /etc/default/grub
    backup: yes
    backrefs: yes
    state: present
    regexp: '^(GRUB_CMDLINE_LINUX=(?!.* {{ line_item }}).*). *$'
    line: "\\1 {{ line_item }}\""
  with_items:
    - "transparent_hugepage=never"
  notify: __sap_hana_preconfigure_regenerate_grub2_conf_handler
  when: not sap_hana_preconfigure_use_tuned or
        sap_hana_preconfigure_modify_grub_cmdline_linux
  tags: grubconfig
  loop_control:
    loop_var: line_item
