-
-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Possibility of adding privileges to objects (#740)
- Loading branch information
Showing
6 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
|
||
- name: Grant/revoke privileges on objects | ||
community.postgresql.postgresql_privs: | ||
roles: "{{ item.role }}" | ||
privs: "{{ item.privs }}" | ||
type: "{{ item.type }}" | ||
objs: "{{ item.objs }}" | ||
schema: "{{ item.schema | default(omit) }}" | ||
db: "{{ item.db }}" | ||
state: "{{ item.state | default('present') }}" | ||
login_host: "127.0.0.1" | ||
login_port: "{{ postgresql_port }}" | ||
login_user: "{{ patroni_superuser_username }}" | ||
login_password: "{{ patroni_superuser_password }}" | ||
ignore_errors: true # noqa ignore-errors | ||
loop: "{{ postgresql_privs | flatten(1) }}" | ||
when: | ||
- postgresql_privs | default('') | length > 0 | ||
- item.role | default('') | length > 0 | ||
- item.db | default('') | length > 0 | ||
- patroni_standby_cluster.host | default('') | length < 1 # do not perform on the Standby Cluster leader | ||
tags: postgresql_privs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters