version_compare not working

This is doing the complete opposite of matching, right?

TASK: [play | debug var=installed_app_version] ***
<10.101.1.105>
ok: [twp01] => {
“installed_app_version”: “5.4.0”
}

TASK: [play | debug var=package_versions.app.app] ***
<10.101.1.105>
ok: [twp01] => {
“package_versions.app.app”: “5.4.0”
}

TASK: [play | debug var={{ installed_app_version | version_compare(‘package_versions.app.app’,‘!=’) }}] ***
<10.101.1.105>
ok: [twp01] => {
“True”: “True”
}

TASK: [play | debug var={{ installed_app_version | version_compare(‘package_versions.app.app’,‘==’) }}] ***
<10.101.1.105>
ok: [twp01] => {
“False”: “False”
}

Am I missing something? These variables are identical, so ‘!=’ should resolve to “False”.

The problem seems to be improper quoting in this part:

version_compare(‘package_versions.app.app’,‘==’)

You don’t want to quote the var, it should just be:

version_compare(package_versions.app.app,‘==’)

That was it