Replies: 6 comments 2 replies
-
Hi, did you find the solution ? |
Beta Was this translation helpful? Give feedback.
-
If we look at the documentation of ansible : https://docs.ansible.com/ansible/latest/collections/community/postgresql/postgresql_privs_module.html
In our case we need to do :
So objs should be pg_monitor But I do not see this in ANXS/postgresql module... |
Beta Was this translation helpful? Give feedback.
-
I did not find but you can do in a task
|
Beta Was this translation helpful? Give feedback.
-
You can try this: postgresql_user_privileges:
- roles: my_user
database: postgres
type: group
objs: pg_monitor
admin_option: false |
Beta Was this translation helpful? Give feedback.
-
And/or with - name: Grant pg_monitor to my_user (without admin option)
community.postgresql.postgresql_privs:
roles: my_user
database: postgres
type: group
objs: pg_monitor
admin_option: false |
Beta Was this translation helpful? Give feedback.
-
I ended up using a task for achieve this: - name: Add myuser to "pg_monitor" group
community.postgresql.postgresql_membership:
group: pg_monitor
target_role: myuser
state: present
become: true
become_user: postgres |
Beta Was this translation helpful? Give feedback.
-
I have already tried configuring the
postgresql_user_privileges
variable as following"My PostgreSQL version is 12.13
Beta Was this translation helpful? Give feedback.
All reactions