Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6bce48e

Browse files
authored
Add documentation for privs with functions and procedures (ansible-collections#169)
1 parent ac927fd commit 6bce48e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plugins/modules/mysql_user.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
the module will always report changes. It includes grouping columns
5454
by permission (C(SELECT(col1,col2)) instead of C(SELECT(col1),SELECT(col2))).
5555
- Can be passed as a dictionary (see the examples).
56+
- Supports GRANTs for procedures and functions (see the examples).
5657
type: raw
5758
append_privs:
5859
description:
@@ -188,6 +189,15 @@
188189
'db1.*': 'ALL,GRANT'
189190
'db2.*': 'ALL,GRANT'
190191
192+
# Use 'PROCEDURE' instead of 'FUNCTION' to apply GRANTs for a MySQL procedure instead.
193+
- name: Grant a user the right to execute a function
194+
community.mysql.mysql_user:
195+
name: readonly
196+
password: 12345
197+
priv:
198+
FUNCTION my_db.my_function: EXECUTE
199+
state: present
200+
191201
# Note that REQUIRESSL is a special privilege that should only apply to *.* by itself.
192202
# Setting this privilege in this manner is deprecated.
193203
# Use 'tls_requires' instead.

0 commit comments

Comments
 (0)