mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
* postgresql_privs: fix the module mistakes a procedure for a function
* add changelog fragment
* fix
(cherry picked from commit 220051768b)
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
@@ -653,6 +653,35 @@
|
||||
login_user: "{{ db_user3 }}"
|
||||
login_password: password
|
||||
|
||||
# Issue https://github.com/ansible-collections/community.general/issues/994
|
||||
- name: Create a procedure for tests
|
||||
postgresql_query:
|
||||
query: "CREATE PROCEDURE mock_procedure() LANGUAGE SQL AS $$ SELECT 1; $$;"
|
||||
db: "{{ db_name }}"
|
||||
login_user: "{{ db_user3 }}"
|
||||
login_password: password
|
||||
when: postgres_version_resp.stdout is version('11', '>=')
|
||||
|
||||
# Issue https://github.com/ansible-collections/community.general/issues/994
|
||||
- name: Try to run module against a procedure, not function
|
||||
postgresql_privs:
|
||||
type: function
|
||||
state: present
|
||||
privs: ALL
|
||||
roles: "{{ db_user2 }}"
|
||||
objs: ALL_IN_SCHEMA
|
||||
schema: public
|
||||
db: "{{ db_name }}"
|
||||
login_user: "{{ db_user3 }}"
|
||||
login_password: password
|
||||
register: result
|
||||
when: postgres_version_resp.stdout is version('11', '>=')
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is not changed
|
||||
when: postgres_version_resp.stdout is version('11', '>=')
|
||||
|
||||
#################################################
|
||||
# Test ALL_IN_SCHEMA for 'partioned tables type #
|
||||
#################################################
|
||||
|
||||
Reference in New Issue
Block a user