From e4765f2e2b47961626e532ea95ec65ffa6b67266 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 20 Apr 2023 06:34:26 +0200 Subject: [PATCH] =?UTF-8?q?[PR=20#6289/6e0bc4f4=20backport][stable-5]=20Re?= =?UTF-8?q?move=20--app=20by=20flatpak=20check=20if=20already=20installed?= =?UTF-8?q?=20(ansible-collectio=E2=80=A6=20(#6371)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove --app by flatpak check if already installed (ansible-collectio… (#6289) * Remove --app by flatpak check if already installed (ansible-collections#6265) * Add Changelogfragment * Fix syntax * Update changelogs/fragments/6289-bugfix-flatpak-check-if-already-installed.yml Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein (cherry picked from commit 6e0bc4f45c4cd4a7e375f0a213c95efd7ce0da54) Co-authored-by: Svenum <43136984+Svenum@users.noreply.github.com> --- .../6289-bugfix-flatpak-check-if-already-installed.yml | 2 ++ plugins/modules/packaging/os/flatpak.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/6289-bugfix-flatpak-check-if-already-installed.yml diff --git a/changelogs/fragments/6289-bugfix-flatpak-check-if-already-installed.yml b/changelogs/fragments/6289-bugfix-flatpak-check-if-already-installed.yml new file mode 100644 index 0000000000..e331250035 --- /dev/null +++ b/changelogs/fragments/6289-bugfix-flatpak-check-if-already-installed.yml @@ -0,0 +1,2 @@ +bugfixes: + - flatpak - fixes idempotency detection issues. In some cases the module could fail to properly detect already existing Flatpaks because of a parameter witch only checks the installed apps (https://github.com/ansible-collections/community.general/pull/6289). diff --git a/plugins/modules/packaging/os/flatpak.py b/plugins/modules/packaging/os/flatpak.py index d6264a50d3..7b45a649ff 100644 --- a/plugins/modules/packaging/os/flatpak.py +++ b/plugins/modules/packaging/os/flatpak.py @@ -208,7 +208,7 @@ def uninstall_flat(module, binary, names, method): def flatpak_exists(module, binary, names, method): """Check if the flatpaks are installed.""" - command = [binary, "list", "--{0}".format(method), "--app"] + command = [binary, "list", "--{0}".format(method)] output = _flatpak_command(module, False, command) installed = [] not_installed = []