From d6ad9beb58c475b58d8d61bdb368e0f47bb7f227 Mon Sep 17 00:00:00 2001 From: Thibault Geoffroy <33561374+nebularnoise@users.noreply.github.com> Date: Fri, 29 Aug 2025 06:25:11 +0200 Subject: [PATCH] kdeconfig: add support for kwriteconfig6 (#10751) * kdeconfig: add support for kwriteconfig6 Rationale: With a minimal install of KDE Plasma 6, the kdeconfig module would systematically fail with the following error: `kwriteconfig is not installed.` In this configuration, kwriteconfig6 is the only version of kwriteconfig installed, and the kdeconfig module did not not find it. Fixes #10746 * Add changelog fragment * Update changelogs/fragments/10751-kdeconfig-support-kwriteconfig6.yml Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein --- changelogs/fragments/10751-kdeconfig-support-kwriteconfig6.yml | 3 +++ plugins/modules/kdeconfig.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/10751-kdeconfig-support-kwriteconfig6.yml diff --git a/changelogs/fragments/10751-kdeconfig-support-kwriteconfig6.yml b/changelogs/fragments/10751-kdeconfig-support-kwriteconfig6.yml new file mode 100644 index 0000000000..716ffa35f1 --- /dev/null +++ b/changelogs/fragments/10751-kdeconfig-support-kwriteconfig6.yml @@ -0,0 +1,3 @@ +bugfixes: + - kdeconfig - ``kwriteconfig`` executable could not be discovered automatically on systems with only ``kwriteconfig6`` installed. + ``kwriteconfig6`` can now be discovered by Ansible (https://github.com/ansible-collections/community.general/issues/10746, https://github.com/ansible-collections/community.general/pull/10751). \ No newline at end of file diff --git a/plugins/modules/kdeconfig.py b/plugins/modules/kdeconfig.py index ac542d04e8..664f7c692e 100644 --- a/plugins/modules/kdeconfig.py +++ b/plugins/modules/kdeconfig.py @@ -257,7 +257,7 @@ def main(): if module.params['kwriteconfig_path'] is not None: kwriteconfig = module.get_bin_path(module.params['kwriteconfig_path'], required=True) else: - for progname in ('kwriteconfig5', 'kwriteconfig', 'kwriteconfig4'): + for progname in ('kwriteconfig6', 'kwriteconfig5', 'kwriteconfig', 'kwriteconfig4'): kwriteconfig = module.get_bin_path(progname) if kwriteconfig is not None: break