mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
* postgresql_privs: add usage_of_types option
* add CI tests
* add changelog fragment
(cherry picked from commit 77bf8b9a66
)
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
parent
407d776610
commit
90ed2fa5c3
3 changed files with 55 additions and 9 deletions
|
@ -71,6 +71,7 @@
|
|||
that:
|
||||
- result is changed
|
||||
|
||||
# Also covers https://github.com/ansible-collections/community.general/issues/884
|
||||
- name: Set table default privs on the schema with hyphen in the name
|
||||
postgresql_privs:
|
||||
login_user: "{{ pg_user }}"
|
||||
|
@ -82,11 +83,34 @@
|
|||
obj: TABLES
|
||||
privs: all
|
||||
state: present
|
||||
usage_on_types: yes
|
||||
register: result
|
||||
check_mode: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
- result.queries is search('ON TYPES')
|
||||
|
||||
# Also covers https://github.com/ansible-collections/community.general/issues/884
|
||||
- name: Set table default privs on the schema with hyphen in the name
|
||||
postgresql_privs:
|
||||
login_user: "{{ pg_user }}"
|
||||
password: password
|
||||
db: "{{ db_name_with_hyphens }}"
|
||||
schema: "{{ db_schema_with_hyphens }}"
|
||||
role: "{{ db_user_with_hyphens }}"
|
||||
type: default_privs
|
||||
obj: TABLES
|
||||
privs: all
|
||||
state: present
|
||||
usage_on_types: no
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
- result.queries is not search('ON TYPES')
|
||||
|
||||
- name: Delete table default privs on the schema with hyphen in the name
|
||||
postgresql_privs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue