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/flatpak.py b/plugins/modules/flatpak.py index feda6ed5b4..40a13736f0 100644 --- a/plugins/modules/flatpak.py +++ b/plugins/modules/flatpak.py @@ -215,7 +215,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 = []