From 27e1e95f7d6fa4d9592b9c28853cc1473c5c2f0d Mon Sep 17 00:00:00 2001 From: Felix Hamme Date: Fri, 27 May 2022 13:53:34 +0200 Subject: [PATCH] mysql_role: add examples for "members_must_exist" argument --- plugins/modules/mysql_role.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/plugins/modules/mysql_role.py b/plugins/modules/mysql_role.py index 97fabe8..593aeb6 100644 --- a/plugins/modules/mysql_role.py +++ b/plugins/modules/mysql_role.py @@ -258,6 +258,26 @@ EXAMPLES = r''' subtract_privs: yes priv: 'db1.*': DELETE + +- name: add some members to a role and skip not-existent users + community.mysql.mysql_role: + state: present + name: foo + append_members: yes + members_must_exist: no + members: + - 'existing_user@localhost' + - 'not_existing_user@localhost' + +- name: detach some members from a role and ignore not-existent users + community.mysql.mysql_role: + state: present + name: foo + detach_members: yes + members_must_exist: no + members: + - 'existing_user@localhost' + - 'not_existing_user@localhost' ''' RETURN = '''#'''