Skip to content

Commit

Permalink
Merge pull request sap-linuxlab#688 from sap-linuxlab/fix/687/handlers
Browse files Browse the repository at this point in the history
fix(sap_hana_preconfigure): move handlers to the correct location
  • Loading branch information
Wabri authored Mar 21, 2024
2 parents 0821135 + a8e024a commit 703dbd5
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions roles/sap_hana_preconfigure/tasks/SLES/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,6 @@

- name: Set GRUB entries
when: __sap_hana_preconfigure_run_saptune
handlers:
- name: GRUB_post-update_configuration
block:
- name: GRUB mkconfig
ansible.builtin.shell:
cmd: grub2-mkconfig -o /boot/grub2/grub.cfg

- name: GRUB.cfg permissions
ansible.builtin.file:
path: /boot/grub2/grub.cfg
mode: "0600"
block:
# Reason for noqa:
# no-changed-when: the regex do a check on the element before apply the
Expand All @@ -61,6 +50,7 @@
path: /etc/default/grub
regexp: '^(GRUB_CMDLINE_LINUX_DEFAULT=(?!.* {{ item }}).*). *$'
line: "\\1 {{ item }}\""
backrefs: true
register: set_grub_entries
with_items:
- "splash=silent"
Expand All @@ -80,8 +70,8 @@
# the configuration file no handler will be notify
- name: Trigger grub update if necessary # noqa no-changed-when
ansible.builtin.command: /bin/true
notify: __sap_hana_preconfigure_regenerate_grub2_conf_handler
when: set_grub_entries.results | selectattr('changed', 'equalto', true) | list | length > 0
notify: GRUB_post-update_configuration

- name: Enable sapconf
when: not __sap_hana_preconfigure_run_saptune
Expand Down

0 comments on commit 703dbd5

Please sign in to comment.