From 994691111e6cf555dba62756d257371376608384 Mon Sep 17 00:00:00 2001 From: Spectro Date: Sun, 7 Dec 2025 06:42:49 +0530 Subject: [PATCH 1/2] feat: Add SLE16+ support --- tasks/main.yml | 11 +++++++++++ vars/Suse.yml | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 vars/Suse.yml diff --git a/tasks/main.yml b/tasks/main.yml index 7205c23..49d3512 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -58,6 +58,16 @@ when: ansible_facts['distribution_major_version'] | int <= 8 changed_when: true +- name: Update crashkernel setting if needed (Suse) + when: + - kdump_reboot_required | bool + - ansible_facts['os_family'] == 'Suse' + block: + - name: Use kdumptool commandline -u (SLES 16+/openSUSE) + command: /usr/sbin/kdumptool commandline -u + when: ansible_facts['distribution_major_version'] | default(0) | int >= 16 + changed_when: true + - name: Fail if reboot is required and kdump_reboot_ok is false fail: msg: >- @@ -88,3 +98,4 @@ name: "{{ __kdump_service }}" state: started register: __kdump_service_start + when: not kdump_reboot_required | bool diff --git a/vars/Suse.yml b/vars/Suse.yml new file mode 100644 index 0000000..a02f2da --- /dev/null +++ b/vars/Suse.yml @@ -0,0 +1,10 @@ +--- +__kdump_packages: + - iproute # for fact gathering for ip facts + - kexec-tools + - kdump + - openssh-clients + +__kdump_conf_file: /etc/kdump.conf +__kdump_service: kdump + From 545845b2ad0f76714ebe1b6a176cff23f18ab562 Mon Sep 17 00:00:00 2001 From: Spectro Date: Tue, 9 Dec 2025 03:09:21 +0530 Subject: [PATCH 2/2] remove block wrapper, use single task for Suse kdumptool task --- tasks/main.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 49d3512..4c07983 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -58,15 +58,13 @@ when: ansible_facts['distribution_major_version'] | int <= 8 changed_when: true -- name: Update crashkernel setting if needed (Suse) +- name: Use kdumptool commandline -u (SLES 16+/openSUSE) + command: /usr/sbin/kdumptool commandline -u when: - kdump_reboot_required | bool - ansible_facts['os_family'] == 'Suse' - block: - - name: Use kdumptool commandline -u (SLES 16+/openSUSE) - command: /usr/sbin/kdumptool commandline -u - when: ansible_facts['distribution_major_version'] | default(0) | int >= 16 - changed_when: true + - ansible_facts['distribution_major_version'] | default(0) | int >= 16 + changed_when: true - name: Fail if reboot is required and kdump_reboot_ok is false fail: