mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-30 04:49:09 -07:00
postgresql_privs: fix the module mistakes a procedure for a function (#996)
* postgresql_privs: fix the module mistakes a procedure for a function * add changelog fragment * fix
This commit is contained in:
parent
104f6a3e96
commit
220051768b
3 changed files with 42 additions and 5 deletions
|
@ -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 #
|
||||
#################################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue