Interview Prep/Linux/Packages, kernel and boot

You need to install a set of security tools on 100 servers with mixed distros consistently. How?

IntermediateScenarioPackages, kernel and boot
Answer

Situation read → Config management with distro-aware package lists.

What I'd do →

- hosts: all
  become: true
  tasks:
    - ansible.builtin.package:
        name: "{{ item }}"
        state: present
      loop: "{{ sec_packages[ansible_os_family] }}"
  vars:
    sec_packages:
      RedHat: [audit, aide, fail2ban]
      Debian: [auditd, aide, fail2ban]

Why → Package names differ across families (audit vs auditd); the generic package module picks the right manager.

Interview tip → Mention idempotence: run it twice, second run reports no changes.

All Linux questions Roadmap: Linux

More on Packages, kernel and boot