postgresql_privs: allow lowercased PUBLIC role (#858)

* postgresql_privs: allow lowercased PUBLIC role

* add changelog fragment

* improve CI

* fix changelog fragment
This commit is contained in:
Andrew Klychkov 2020-09-10 16:08:57 +03:00 committed by GitHub
parent eb24b5707e
commit bfdb76e60d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 1 deletions

View file

@ -343,6 +343,23 @@
target_roles: "{{ db_user_with_dots2 }}"
trust_input: no
# Bugfix for https://github.com/ansible-collections/community.general/issues/857
- name: Test passing lowercase PUBLIC role
become_user: "{{ pg_user }}"
become: yes
postgresql_privs:
db: "{{ db_name }}"
login_user: "{{ pg_user }}"
type: 'database'
privs: 'connect'
role: 'public'
register: result
- assert:
that:
- result is changed
- result.queries == ["GRANT CONNECT ON database \"{{ db_name }}\" TO PUBLIC;"]
#
# Cleanup
#