galaxyproject / ansible-postgresql

An Ansible role for managing a PostgreSQL server
https://galaxy.ansible.com/galaxyproject/postgresql
122 stars 58 forks source link

Ansible deprecation warning: Using tests as filters is deprecated. #14

Closed dpneumo closed 4 years ago

dpneumo commented 6 years ago

This line occurs twice in tasks/main.yml:

when: "{{ postgresql_version | version_compare('9.3', '>=') }}"

Replacing it with:

when: postgresql_version  >= '9.3'

avoids this deprecation warning from Ansible 2.5:

Using tests as filters is deprecated.
Instead of using`result|version_compare` instead use `result is version_compare`. 
This feature will be removed in version 2.9.
natefoo commented 4 years ago

Thanks @dpneumo, this was fixed in #18.