diff --git a/tasks/debian10.yml b/tasks/debian10.yml index 7f9689e..cc8950e 100644 --- a/tasks/debian10.yml +++ b/tasks/debian10.yml @@ -3,6 +3,14 @@ apt: name: "{{ cluster_node_is_remote | bool | ternary(pacemaker_remote_packages, pacemaker_packages) }}" state: 'present' + cache_valid_time: 3600 + +- name: Install package(s) for fence_kdump + apt: + name: "{{ fence_kdump_packages }}" + state: 'present' + cache_valid_time: 3600 + when: cluster_configure_fence_kdump|bool - name: Check if Corosync configuration is default configuration command: '/usr/bin/dpkg --verify corosync' diff --git a/tasks/debian11.yml b/tasks/debian11.yml index 44a30d6..ac19cf8 100644 --- a/tasks/debian11.yml +++ b/tasks/debian11.yml @@ -12,6 +12,13 @@ cache_valid_time: 3600 when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '11' +- name: Install package(s) for fence_kdump + apt: + name: "{{ fence_kdump_packages }}" + state: 'present' + cache_valid_time: 3600 + when: cluster_configure_fence_kdump|bool + - name: Check if Corosync configuration is default configuration command: '/usr/bin/dpkg --verify corosync' register: result diff --git a/tasks/fence_kdump.yml b/tasks/fence_kdump.yml index 38fb62b..80990fb 100644 --- a/tasks/fence_kdump.yml +++ b/tasks/fence_kdump.yml @@ -12,9 +12,10 @@ name: "fence-kdump-{{ hostvars[item][cluster_hostname_fact] }}" resource_class: 'stonith' resource_type: 'fence_kdump' - options: "pcmk_host_list={{ hostvars[item][cluster_hostname_fact] }}" + options: "pcmk_host_list={{ hostvars[item][cluster_hostname_fact] }} {% if ansible_distribution == 'Debian' %}pcmk_monitor_action=metadata{% endif %}" with_items: "{{ play_hosts }}" run_once: true + # FIXME: fence_kdump on Debian returns exit code 1 for 'monitor' op so we use 'metadata' as dummy replacement - name: create fence constraints pcs_constraint_location: diff --git a/vars/debian10.yml b/vars/debian10.yml index 698a1b6..94ae21b 100644 --- a/vars/debian10.yml +++ b/vars/debian10.yml @@ -5,7 +5,10 @@ pacemaker_packages: pacemaker_remote_packages: - pcs - pacemaker-remote +fence_kdump_packages: + - kdump-tools +kdump_service_name: 'kdump-tools' cluster_configure_fence_xvm: false cluster_firewall: false diff --git a/vars/debian11.yml b/vars/debian11.yml index 698a1b6..94ae21b 100644 --- a/vars/debian11.yml +++ b/vars/debian11.yml @@ -5,7 +5,10 @@ pacemaker_packages: pacemaker_remote_packages: - pcs - pacemaker-remote +fence_kdump_packages: + - kdump-tools +kdump_service_name: 'kdump-tools' cluster_configure_fence_xvm: false cluster_firewall: false