diff --git a/plugins/module_utils/mysql.py b/plugins/module_utils/mysql.py index 484f170..6a1cc93 100644 --- a/plugins/module_utils/mysql.py +++ b/plugins/module_utils/mysql.py @@ -55,7 +55,7 @@ def mysql_connect(module, login_user=None, login_password=None, config_file='', except Exception as e: module.fail_json(msg="Failed to parse %s: %s" % (config_file, to_native(e))) - # Override some commond defaults with values from config file if needed + # Override some common defaults with values from config file if needed if cp and cp.has_section('client'): try: module.params['login_host'] = cp.get('client', 'host', fallback=module.params['login_host']) diff --git a/plugins/modules/mysql_db.py b/plugins/modules/mysql_db.py index 285aa9e..21a0c78 100644 --- a/plugins/modules/mysql_db.py +++ b/plugins/modules/mysql_db.py @@ -162,7 +162,7 @@ options: type: str version_added: '2.3.3' -seealso: +see also: - module: community.mysql.mysql_info - module: community.mysql.mysql_variables - module: community.mysql.mysql_user @@ -335,7 +335,10 @@ import traceback from ansible.module_utils.basic import AnsibleModule from ansible_collections.community.mysql.plugins.module_utils.database import mysql_quote_identifier -from ansible_collections.community.mysql.plugins.module_utils.mysql import mysql_connect, mysql_driver, mysql_driver_fail_msg, mysql_common_argument_spec +from ansible_collections.community.mysql.plugins.module_utils.mysql import ( + mysql_connect, mysql_driver, + mysql_driver_fail_msg, mysql_common_argument_spec +) from ansible.module_utils.six.moves import shlex_quote from ansible.module_utils._text import to_native @@ -520,7 +523,7 @@ def db_import(module, host, user, password, db_name, target, all_databases, port return p2.returncode, stdout2, stderr2 else: # Used to prevent 'Broken pipe' errors that - # occasionaly occur when target files are compressed. + # occasionally occur when target files are compressed. # FYI: passing the `shell=True` argument to p2 = subprocess.Popen() # doesn't solve the problem. cmd = " ".join(cmd) @@ -670,8 +673,8 @@ def main(): ) except Exception as e: if os.path.exists(config_file): - module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s has the credentials. " - "Exception message: %s" % (config_file, to_native(e))) + module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s " + "has the credentials. Exception message: %s" % (config_file, to_native(e))) else: module.fail_json(msg="unable to find %s. Exception message: %s" % (config_file, to_native(e))) diff --git a/plugins/modules/mysql_info.py b/plugins/modules/mysql_info.py index 656adf1..387b8f6 100644 --- a/plugins/modules/mysql_info.py +++ b/plugins/modules/mysql_info.py @@ -184,7 +184,8 @@ engines: returned: if not excluded by filter type: dict sample: - - { "CSV": { "Comment": "CSV storage engine", "Savepoints": "NO", "Support": "YES", "Transactions": "NO", "XA": "NO" } } + - { "CSV": { "Comment": "CSV storage engine", "Savepoints": "NO", "Support": "YES", "Transactions": "NO", + "XA": "NO" } } master_status: description: Master status information. returned: if master @@ -196,7 +197,8 @@ slave_status: returned: if standby type: dict sample: - - { "192.168.1.101": { "3306": { "replication_user": { "Connect_Retry": 60, "Exec_Master_Log_Pos": 769, "Last_Errno": 0 } } } } + - { "192.168.1.101": { "3306": { "replication_user": { "Connect_Retry": 60, "Exec_Master_Log_Pos": 769, + "Last_Errno": 0 } } } } slave_hosts: description: Slave status information. returned: if master @@ -341,7 +343,7 @@ class MySQL_Info(object): self.info['engines'][engine][vname] = val def __convert(self, val): - """Convert unserializable data.""" + """Convert un-serializable data.""" try: if isinstance(val, Decimal): val = float(val) @@ -564,8 +566,8 @@ def main(): check_hostname=check_hostname, connect_timeout=connect_timeout, cursor_class='DictCursor') except Exception as e: - module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s has the credentials. " - "Exception message: %s" % (config_file, to_native(e))) + module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s " + "has the credentials. Exception message: %s" % (config_file, to_native(e))) ############################### # Create object and do main job diff --git a/plugins/modules/mysql_query.py b/plugins/modules/mysql_query.py index ffe80ed..b4eea92 100644 --- a/plugins/modules/mysql_query.py +++ b/plugins/modules/mysql_query.py @@ -43,7 +43,8 @@ options: - Where passed queries run in a single transaction (C(yes)) or commit them one-by-one (C(no)). type: bool default: no -seealso: + +see also: - module: community.mysql.mysql_db author: - Andrew Klychkov (@Andersson007) diff --git a/plugins/modules/mysql_replication.py b/plugins/modules/mysql_replication.py index 3316694..fbafe75 100644 --- a/plugins/modules/mysql_replication.py +++ b/plugins/modules/mysql_replication.py @@ -188,7 +188,7 @@ extends_documentation_fragment: - community.mysql.mysql -seealso: +see also: - module: community.mysql.mysql_info - name: MySQL replication reference description: Complete reference of the MySQL replication documentation. diff --git a/plugins/modules/mysql_role.py b/plugins/modules/mysql_role.py index 80d0144..814c2ba 100644 --- a/plugins/modules/mysql_role.py +++ b/plugins/modules/mysql_role.py @@ -111,7 +111,7 @@ notes: If you want to avoid this behavior, set I(set_default_role_all) to C(no). - Supports C(check_mode). -seealso: +see also: - module: community.mysql.mysql_user - name: MySQL role reference description: Complete reference of the MySQL role documentation. diff --git a/plugins/modules/mysql_user.py b/plugins/modules/mysql_user.py index 39649b8..ddbead4 100644 --- a/plugins/modules/mysql_user.py +++ b/plugins/modules/mysql_user.py @@ -415,8 +415,8 @@ def main(): connect_timeout=connect_timeout, check_hostname=check_hostname ) except Exception as e: - module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s has the credentials. " - "Exception message: %s" % (config_file, to_native(e))) + module.fail_json(msg="unable to connect to database, check login_user and login_password are correct or %s " + "has the credentials. Exception message: %s" % (config_file, to_native(e))) if not sql_log_bin: cursor.execute("SET SQL_LOG_BIN=0;")