mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-08 11:40:33 -07:00
fix merge conflicts
This commit is contained in:
parent
273fd2cdcc
commit
ea79c2a965
1 changed files with 6 additions and 0 deletions
|
@ -154,6 +154,9 @@ def user_add(cursor, user, host, host_all, password, encrypted,
|
||||||
plugin, plugin_hash_string, plugin_auth_string, new_priv,
|
plugin, plugin_hash_string, plugin_auth_string, new_priv,
|
||||||
attributes, tls_requires, module, reuse_existing_password,
|
attributes, tls_requires, module, reuse_existing_password,
|
||||||
password_expire, password_expire_interval):
|
password_expire, password_expire_interval):
|
||||||
|
# If attributes are set, perform a sanity check to ensure server supports user attributes before creating user
|
||||||
|
if attributes and not get_attribute_support(cursor):
|
||||||
|
module.fail_json(msg="user attributes were specified but the server does not support user attributes")
|
||||||
# we cannot create users without a proper hostname
|
# we cannot create users without a proper hostname
|
||||||
if host_all:
|
if host_all:
|
||||||
return {'changed': False, 'password_changed': False, 'attributes': attributes}
|
return {'changed': False, 'password_changed': False, 'attributes': attributes}
|
||||||
|
@ -1086,6 +1089,9 @@ def get_attribute_support(cursor):
|
||||||
def attributes_get(cursor, user, host):
|
def attributes_get(cursor, user, host):
|
||||||
"""Get attributes for a given user.
|
"""Get attributes for a given user.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
cursor (cursor): DB driver cursor object.
|
||||||
|
user (str): User name.
|
||||||
host (str): User host name.
|
host (str): User host name.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
Loading…
Add table
Reference in a new issue