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

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

* Add unit tests

* Add changelog fragment

* fix
This commit is contained in:
Andrew Klychkov 2020-10-16 11:56:15 +03:00 committed by GitHub
commit 398421a9d1
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