postgresql_ext postgis installation failed
strelnikov opened this issue · 2 comments
- name: installing postgis extensions
postgresql_ext:
name: postgis
db: '{{ db_name }}'
state: present
become_user: postgres
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_postgresql_ext_payload_bti8q6lk/ansible_postgresql_ext_payload.zip/ansible_collections/community/general/plugins/modules/postgresql_ext.py", line 344, in main
File "/tmp/ansible_postgresql_ext_payload_bti8q6lk/ansible_postgresql_ext_payload.zip/ansible_collections/community/general/plugins/modules/postgresql_ext.py", line 289, in ext_get_versions
File "/tmp/ansible_postgresql_ext_payload_bti8q6lk/ansible_postgresql_ext_payload.zip/ansible_collections/community/general/plugins/modules/postgresql_ext.py", line 292, in
File "/usr/lib/python3.8/distutils/version.py", line 64, in gt
c = self._cmp(other)
File "/usr/lib/python3.8/distutils/version.py", line 337, in _cmp
if self.version < other.version:
TypeError: '<' not supported between instances of 'str' and 'int'
fatal: [xxx]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"ca_cert": null,
"cascade": false,
"db": "dobrysef",
"ext": "postgis",
"login_host": "",
"login_password": "",
"login_unix_socket": "",
"login_user": "postgres",
"name": "postgis",
"port": 5432,
"schema": null,
"session_role": null,
"ssl_mode": "prefer",
"state": "present",
"trust_input": true,
"version": null
}
},
"msg": "Database query failed: '<' not supported between instances of 'str' and 'int'"
}
postgres=# SELECT extversion FROM pg_catalog.pg_extension where extname='postgis';
extversion
3.1.0
(1 row)
postgres=# SELECT version FROM pg_available_extension_versions where name='postgis';
version
unpackaged
3.1.0
3.1.0next
(3 rows)
sorry, reported to ansible repo