mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-08 19:50:31 -07:00
add back function argument deleted during rebase
This commit is contained in:
parent
6b4fbd1b99
commit
16ac592834
3 changed files with 8 additions and 4 deletions
|
@ -627,7 +627,7 @@ def sort_column_order(statement):
|
||||||
return '%s(%s)' % (priv_name, ', '.join(columns))
|
return '%s(%s)' % (priv_name, ', '.join(columns))
|
||||||
|
|
||||||
|
|
||||||
def privileges_unpack(priv, mode, ensure_usage=True):
|
def privileges_unpack(priv, mode, column_case_sensitive, ensure_usage=True):
|
||||||
""" Take a privileges string, typically passed as a parameter, and unserialize
|
""" Take a privileges string, typically passed as a parameter, and unserialize
|
||||||
it into a dictionary, the same format as privileges_get() above. We have this
|
it into a dictionary, the same format as privileges_get() above. We have this
|
||||||
custom format to avoid using YAML/JSON strings inside YAML playbooks. Example
|
custom format to avoid using YAML/JSON strings inside YAML playbooks. Example
|
||||||
|
|
|
@ -967,7 +967,8 @@ def main():
|
||||||
detach_members=dict(type='bool', default=False),
|
detach_members=dict(type='bool', default=False),
|
||||||
check_implicit_admin=dict(type='bool', default=False),
|
check_implicit_admin=dict(type='bool', default=False),
|
||||||
set_default_role_all=dict(type='bool', default=True),
|
set_default_role_all=dict(type='bool', default=True),
|
||||||
members_must_exist=dict(type='bool', default=True)
|
members_must_exist=dict(type='bool', default=True),
|
||||||
|
column_case_sensitive=dict(type='bool', default=False)
|
||||||
)
|
)
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=argument_spec,
|
argument_spec=argument_spec,
|
||||||
|
@ -1002,6 +1003,7 @@ def main():
|
||||||
db = ''
|
db = ''
|
||||||
set_default_role_all = module.params['set_default_role_all']
|
set_default_role_all = module.params['set_default_role_all']
|
||||||
members_must_exist = module.params['members_must_exist']
|
members_must_exist = module.params['members_must_exist']
|
||||||
|
column_case_sensitive = module.params['column_case_sensitive']
|
||||||
|
|
||||||
if priv and not isinstance(priv, (str, dict)):
|
if priv and not isinstance(priv, (str, dict)):
|
||||||
msg = ('The "priv" parameter must be str or dict '
|
msg = ('The "priv" parameter must be str or dict '
|
||||||
|
@ -1051,7 +1053,7 @@ def main():
|
||||||
module.fail_json(msg=to_native(e))
|
module.fail_json(msg=to_native(e))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
priv = privileges_unpack(priv, mode, ensure_usage=not subtract_privs)
|
priv = privileges_unpack(priv, mode, column_case_sensitive, ensure_usage=not subtract_privs)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg='Invalid privileges string: %s' % to_native(e))
|
module.fail_json(msg='Invalid privileges string: %s' % to_native(e))
|
||||||
|
|
||||||
|
|
|
@ -411,6 +411,7 @@ def main():
|
||||||
resource_limits=dict(type='dict'),
|
resource_limits=dict(type='dict'),
|
||||||
force_context=dict(type='bool', default=False),
|
force_context=dict(type='bool', default=False),
|
||||||
session_vars=dict(type='dict'),
|
session_vars=dict(type='dict'),
|
||||||
|
column_case_sensitive=dict(type='bool', default=False)
|
||||||
)
|
)
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=argument_spec,
|
argument_spec=argument_spec,
|
||||||
|
@ -446,6 +447,7 @@ def main():
|
||||||
plugin_auth_string = module.params["plugin_auth_string"]
|
plugin_auth_string = module.params["plugin_auth_string"]
|
||||||
resource_limits = module.params["resource_limits"]
|
resource_limits = module.params["resource_limits"]
|
||||||
session_vars = module.params["session_vars"]
|
session_vars = module.params["session_vars"]
|
||||||
|
column_case_sensitive = module.params["column_case_sensitive"]
|
||||||
|
|
||||||
if priv and not isinstance(priv, (str, dict)):
|
if priv and not isinstance(priv, (str, dict)):
|
||||||
module.fail_json(msg="priv parameter must be str or dict but %s was passed" % type(priv))
|
module.fail_json(msg="priv parameter must be str or dict but %s was passed" % type(priv))
|
||||||
|
@ -485,7 +487,7 @@ def main():
|
||||||
mode = get_mode(cursor)
|
mode = get_mode(cursor)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg=to_native(e))
|
module.fail_json(msg=to_native(e))
|
||||||
priv = privileges_unpack(priv, mode, ensure_usage=not subtract_privs)
|
priv = privileges_unpack(priv, mode, column_case_sensitive, ensure_usage=not subtract_privs)
|
||||||
password_changed = False
|
password_changed = False
|
||||||
if state == "present":
|
if state == "present":
|
||||||
if user_exists(cursor, user, host, host_all):
|
if user_exists(cursor, user, host, host_all):
|
||||||
|
|
Loading…
Add table
Reference in a new issue