Menu Close

Chapter 16. Configuring kdump using RHEL System Roles

To manage kdump using Ansible, you can use the Kernel Dumps role, which is one of the RHEL System Roles available in RHEL 8.

Using the Kernel Dumps role enables you to specify where to save the contents of the system’s memory for later analysis.

For more information about RHEL System Roles and how to apply them, see Introduction to RHEL System Roles.

16.1. The Kernel Dumps RHEL System Role

The Kernel Dumps System Role enables you to set basic kernel dump parameters on multiple systems.

16.2. Kernel Dumps role parameters

The parameters used for the Kernel Dumps` RHEL System Roles are:

Role VariableDescription

kdump_path

The path to which vmcore is written. If kdump_target is not null, path is relative to that dump target. Otherwise, it must be an absolute path in the root file system.

Additional resources

  • The makedumpfile(8) man page.
  • For details about the parameters used in kdump and additional information about the Kernel Dumps System Role, see the /usr/share/ansible/roles/rhel-system-roles.tlog/README.md file.

16.3. Configuring kdump using RHEL System Roles

You can set basic kernel dump parameters on multiple systems using the Kernel Dumps System Role by running an Ansible playbook.

Warning

The Kernel Dumps role replaces the kdump configuration of the managed hosts entirely by replacing the /etc/kdump.conf file. Additionally, if the Kernel Dumps role is applied, all previous kdump settings are also replaced, even if they are not specified by the role variables, by replacing the /etc/sysconfig/kdump file.

Prerequisites

  • The Ansible Core package is installed on the control machine.
  • You have the rhel-system-roles package installed on the system from which you want to run the playbook.
  • You have an inventory file which lists the systems on which you want to deploy kdump.

Procedure

  1. Create a new playbook.yml file with the following content:

    ---
    - hosts: kdump-test
      vars:
        kdump_path: /var/crash
      roles:
        - rhel-system-roles.kdump
  2. Optional: Verify playbook syntax.

    # ansible-playbook --syntax-check playbook.yml
  3. Run the playbook on your inventory file:

    # ansible-playbook -i inventory_file /path/to/file/playbook.yml

Additional resources

  • For a detailed reference on Kernel Dumps role variables, see the README.md or README.html files in the /usr/share/doc/rhel-system-roles/kdump directory.
  • See Applying a system role.
  • Documentation installed with the rhel-system-roles package /usr/share/ansible/roles/rhel-system-roles.kdump/README.html