diff --git a/defaults/main.yml b/defaults/main.yml index 8b105762..3b223c72 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -815,4 +815,4 @@ postgresql_dnf_repository_gpgkey: "{{ postgresql_yum_repository_gpgkey }}" postgresql_apt_py3_dependencies: ["python3-psycopg2", "locales"] postgresql_apt_py2_dependencies: ["python-psycopg2", "python-pycurl", "locales"] -postgresql_apt_dependencies: "{{ postgresql_apt_py3_dependencies if 'python3' in ansible_python_interpreter|default('') else postgresql_apt_py2_dependencies }}" +postgresql_apt_dependencies: "{{ postgresql_apt_py3_dependencies if ansible_python.version.major == 3 else postgresql_apt_py2_dependencies }}"