postgresql_ext: fix module's failing when available ext versions contain a pure string (#1099) (#1104)

* postgresql_ext: fix module's failing when available ext versions contain a pure string

* Add unit tests

* Add changelog fragment

* fix

(cherry picked from commit 398421a9d1)

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
patchback[bot] 2020-10-16 12:15:54 +03:00 committed by GitHub
commit ebb9d8a6fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 85 additions and 6 deletions

View file

@ -330,6 +330,23 @@
- result.failed == true
- result.msg == "Extension non_existent is not installed"
######################################################################
# https://github.com/ansible-collections/community.general/issues/1095
- name: Install postgis
package:
name: postgis
- name: Create postgis extension
<<: *task_parameters
postgresql_ext:
<<: *pg_parameters
name: postgis
version: latest
- assert:
that:
- result is changed
# Cleanup:
- name: postgresql_ext_version - drop the extension
<<: *task_parameters