Skip to content

KDE Plasma Ansible Role

An Ansible role that installs and configures the KDE Plasma desktop on Debian, Ubuntu, Kali, and Red Hat family systems. It defaults to the minimal kde-plasma-desktop footprint and can optionally layer on the full plasma-desktop experience. Kali uses the kali-desktop-kde metapackage by default.

Features

  • Install a minimal KDE Plasma desktop or the full Plasma suite on demand
  • Kali Linux support via the upstream kali-desktop-kde metapackage
  • Optionally run update-alternatives so KDE Plasma becomes the default session
  • Render opinionated KDE configuration via a template

Installation

roles:
  - name: kde-plasma
    src: https://gitlab.com/niclas-zone/tools/ansible/roles/kde-plasma.git
    version: main
    scm: git

Role Variables

Variable Default Value Type Description
kde_plasma_install true bool Enables or disables the entire role.
kde_plasma_state present string Desired package state (present / absent).
kde_plasma_install_full_suite false bool Install the full Plasma desktop (plasma-desktop) in addition to the minimal set.
kde_plasma_packages [] list Explicit package list override (skips minimal/full logic).
kde_plasma_activate_session true bool Run update-alternatives so KDE Plasma becomes the default session.
kde_plasma_session_alternative_name x-session-manager string Name of the alternatives group to update.
kde_plasma_session_command /usr/bin/startplasma-x11 string Command used when activating the Plasma session.
kde_plasma_manage_configuration true bool Render kde_plasma_config_options via template.
kde_plasma_config_file /etc/kde/kde-plasma.conf string Destination path for the rendered configuration.
kde_plasma_config_options see defaults dict Structured config data consumed by the template.

Example Playbooks

Basic

- hosts: linux-clients
  become: true
  roles:
    - role: kde-plasma

Full Desktop Experience

- hosts: creative_nodes
  become: true
  roles:
    - role: kde-plasma
      vars:
        kde_plasma_install_full_suite: true
        kde_plasma_config_options:
          General:
            desktop_session: plasma
            theme: Breeze Dark