diff --git a/plugins/modules/mysql_db.py b/plugins/modules/mysql_db.py index 83a935eb..5a8fe3e3 100644 --- a/plugins/modules/mysql_db.py +++ b/plugins/modules/mysql_db.py @@ -53,12 +53,12 @@ description: - Execute the dump in a single transaction. type: bool - default: no + default: false quick: description: - Option used for dumping large tables. type: bool - default: yes + default: true ignore_tables: description: - A list of table names that will be ignored in the dump @@ -70,14 +70,14 @@ description: - Dump binary columns using hexadecimal notation. type: bool - default: no + default: false version_added: '0.1.0' force: description: - Continue dump or import even if we get an SQL error. - Used only when I(state) is C(dump) or C(import). type: bool - default: no + default: false version_added: '0.1.0' master_data: description: @@ -96,7 +96,7 @@ description: - Skip locking tables for read. Used when I(state=dump), ignored otherwise. type: bool - default: no + default: false version_added: '0.1.0' dump_extra_args: description: @@ -110,7 +110,7 @@ - If C(yes), the module will internally execute commands via a shell. - Used when I(state=import), ignored otherwise. type: bool - default: no + default: false version_added: '0.1.0' unsafe_login_password: description: @@ -121,7 +121,7 @@ - Used only when I(state) is C(import) or C(dump) and I(login_password) is passed, ignored otherwise. type: bool - default: no + default: false version_added: '0.1.0' restrict_config_file: description: @@ -132,14 +132,14 @@ under the hood that read named option file in addition to usual option files. - If this behavior is undesirable, use C(yes) to read only named option file. type: bool - default: no + default: false version_added: '0.1.0' check_implicit_admin: description: - Check if mysql allows login as root/nopassword before trying supplied credentials. - If success, passed I(login_user)/I(login_password) will be ignored. type: bool - default: no + default: false version_added: '0.1.0' config_overrides_defaults: description: @@ -148,7 +148,7 @@ - Used when I(stat) is C(present) or C(absent), ignored otherwise. - It needs Python 3.5+ as the default interpreter on a target host. type: bool - default: no + default: false version_added: '0.1.0' chdir: description: @@ -163,7 +163,7 @@ - The default is C(no) to prevent issues on systems without bash as a default interpreter. - The default will change to C(yes) in community.mysql 4.0.0. type: bool - default: no + default: false version_added: '3.4.0' seealso: @@ -230,7 +230,7 @@ name: my_db state: import target: /tmp/dump.sql.bz2 - force: yes + force: true - name: Dump multiple databases community.mysql.mysql_db: @@ -302,7 +302,7 @@ - name: Try to create database as root/nopassword first. If not allowed, pass the credentials community.mysql.mysql_db: - check_implicit_admin: yes + check_implicit_admin: true login_user: bob login_password: 123456 name: bobdata diff --git a/plugins/modules/mysql_info.py b/plugins/modules/mysql_info.py index 1daa9b9d..c7761a2d 100644 --- a/plugins/modules/mysql_info.py +++ b/plugins/modules/mysql_info.py @@ -42,7 +42,7 @@ description: - Includes names of empty databases to returned dictionary. type: bool - default: no + default: false notes: - Calculating the size of a database might be slow, depending on the number and size of tables in it. @@ -96,14 +96,14 @@ filter: "!settings,!users" - name: Collect info about databases and version using ~/.my.cnf as a credential file - become: yes + become: true community.mysql.mysql_info: filter: - databases - version - name: Collect info about databases and version using ~alice/.my.cnf as a credential file - become: yes + become: true community.mysql.mysql_info: config_file: /home/alice/.my.cnf filter: @@ -111,13 +111,13 @@ - version - name: Collect info about databases including empty and excluding their sizes - become: yes + become: true community.mysql.mysql_info: config_file: /home/alice/.my.cnf filter: - databases exclude_fields: db_size - return_empty_dbs: yes + return_empty_dbs: true ''' RETURN = r''' diff --git a/plugins/modules/mysql_query.py b/plugins/modules/mysql_query.py index 04f6201f..a3d7ce23 100644 --- a/plugins/modules/mysql_query.py +++ b/plugins/modules/mysql_query.py @@ -27,7 +27,7 @@ the state has been changed even if it has not. If it is important in your workflow, use the C(PyMySQL) connector instead. type: raw - required: yes + required: true positional_args: description: - List of values to be passed as positional arguments to the query. @@ -46,7 +46,7 @@ description: - Where passed queries run in a single transaction (C(yes)) or commit them one-by-one (C(no)). type: bool - default: no + default: false seealso: - module: community.mysql.mysql_db author: @@ -87,7 +87,7 @@ query: - INSERT INTO articles (id, story) VALUES (2, 'my_long_story') - INSERT INTO prices (id, price) VALUES (123, '100.00') - single_transaction: yes + single_transaction: true ''' RETURN = r''' diff --git a/plugins/modules/mysql_replication.py b/plugins/modules/mysql_replication.py index d63905fd..5d1a0e53 100644 --- a/plugins/modules/mysql_replication.py +++ b/plugins/modules/mysql_replication.py @@ -184,7 +184,7 @@ description: - Fails on error when calling mysql. type: bool - default: False + default: false version_added: '0.1.0' notes: @@ -263,12 +263,12 @@ community.mysql.mysql_replication: mode: startreplica connection_name: primary-1 - fail_on_error: yes + fail_on_error: true - name: Change primary and fail on error (like when replica thread is running) community.mysql.mysql_replication: mode: changeprimary - fail_on_error: yes + fail_on_error: true ''' diff --git a/plugins/modules/mysql_role.py b/plugins/modules/mysql_role.py index 25b7e4c5..01cb6258 100644 --- a/plugins/modules/mysql_role.py +++ b/plugins/modules/mysql_role.py @@ -53,7 +53,7 @@ - Append the privileges defined by the I(priv) option to the existing ones for this role instead of overwriting them. Mutually exclusive with I(subtract_privs). type: bool - default: no + default: false subtract_privs: description: @@ -62,7 +62,7 @@ Mutually exclusive with I(append_privs). version_added: '3.2.0' type: bool - default: no + default: false members: description: @@ -80,7 +80,7 @@ for this role instead of overwriting them. - Mutually exclusive with the I(detach_members) and I(admin) option. type: bool - default: no + default: false detach_members: description: @@ -88,7 +88,7 @@ instead of overwriting all the current members. - Mutually exclusive with the I(append_members) and I(admin) option. type: bool - default: no + default: false set_default_role_all: description: @@ -96,7 +96,7 @@ - If C(yes), runs B(SET DEFAULT ROLE ALL TO) each of the I(members) when changed. - If you want to avoid this behavior, set this option to C(no) explicitly. type: bool - default: yes + default: true state: description: @@ -112,14 +112,14 @@ - Check if mysql allows login as root/nopassword before trying supplied credentials. - If success, passed I(login_user)/I(login_password) will be ignored. type: bool - default: no + default: false members_must_exist: description: - When C(yes), the module fails if any user in I(members) does not exist. - When C(no), users in I(members) which don't exist are simply skipped. type: bool - default: yes + default: true notes: - Pay attention that the module runs C(SET DEFAULT ROLE ALL TO) @@ -181,7 +181,7 @@ members: - 'alice@%' - 'bob@%' - set_default_role_all: no + set_default_role_all: false # Assuming that the role developers exists, # add john to the current members @@ -189,7 +189,7 @@ community.mysql.mysql_role: name: developers state: present - append_members: yes + append_members: true members: - 'joe@localhost' @@ -208,7 +208,7 @@ name: readers state: present priv: 'fiction.*:UPDATE' - append_privs: yes + append_privs: true - name: Create role with the 'SELECT' and 'UPDATE' privileges in db1 and db2 community.mysql.mysql_role: @@ -224,7 +224,7 @@ name: readers members: - 'joe@localhost' - detach_members: yes + detach_members: true - name: Remove the role readers if exists community.mysql.mysql_role: @@ -258,7 +258,7 @@ community.mysql.mysql_role: state: present name: foo - subtract_privs: yes + subtract_privs: true priv: 'db1.*': DELETE @@ -266,8 +266,8 @@ community.mysql.mysql_role: state: present name: foo - append_members: yes - members_must_exist: no + append_members: true + members_must_exist: false members: - 'existing_user@localhost' - 'not_existing_user@localhost' @@ -276,8 +276,8 @@ community.mysql.mysql_role: state: present name: foo - detach_members: yes - members_must_exist: no + detach_members: true + members_must_exist: false members: - 'existing_user@localhost' - 'not_existing_user@localhost' diff --git a/plugins/modules/mysql_user.py b/plugins/modules/mysql_user.py index ed7dde04..8acb8a35 100644 --- a/plugins/modules/mysql_user.py +++ b/plugins/modules/mysql_user.py @@ -29,7 +29,7 @@ description: - Indicate that the 'password' field is a `mysql_native_password` hash. type: bool - default: no + default: false host: description: - The 'host' part of the MySQL username. @@ -41,7 +41,7 @@ to all hostnames for a given user. - This option cannot be used when creating users. type: bool - default: no + default: false priv: description: - "MySQL privileges string in the format: C(db.table:priv1,priv2)." @@ -66,7 +66,7 @@ - Append the privileges defined by priv to the existing ones for this user instead of overwriting existing ones. Mutually exclusive with I(subtract_privs). type: bool - default: no + default: false subtract_privs: description: - Revoke the privileges defined by the I(priv) option and keep other existing privileges. @@ -74,7 +74,7 @@ Mutually exclusive with I(append_privs). version_added: '3.2.0' type: bool - default: no + default: false tls_requires: description: - Set requirement for secure transport as a dictionary of requirements (see the examples). @@ -87,7 +87,7 @@ description: - Whether binary logging should be enabled or disabled for the connection. type: bool - default: yes + default: true force_context: description: - Sets the ะก(mysql) system database as context for the executed statements (it will be used @@ -99,7 +99,7 @@ - See U(https://dev.mysql.com/doc/refman/8.0/en/replication-options-replica.html#option_mysqld_replicate-ignore-db) for a description on how replication filters work (filtering on the replica). type: bool - default: no + default: false version_added: '3.1.0' state: description: @@ -113,7 +113,7 @@ - Check if mysql allows login as root/nopassword before trying supplied credentials. - If success, passed I(login_user)/I(login_password) will be ignored. type: bool - default: no + default: false update_password: description: - C(always) will update passwords if they differ. This affects I(password) and the combination of I(plugin), I(plugin_hash_string), I(plugin_auth_string). @@ -190,7 +190,7 @@ - name: Removes all anonymous user accounts community.mysql.mysql_user: name: '' - host_all: yes + host_all: true state: absent - name: Create database user with name 'bob' and password '12345' with all database privileges @@ -204,7 +204,7 @@ community.mysql.mysql_user: name: bob password: '*EE0D72C1085C46C5278932678FBE2C6A782821B4' - encrypted: yes + encrypted: true priv: '*.*:ALL' state: present @@ -265,7 +265,7 @@ If mysql allows root/nopassword login, try it without the credentials first. If it's not allowed, pass the credentials community.mysql.mysql_user: - check_implicit_admin: yes + check_implicit_admin: true login_user: root login_password: 123456 name: sally @@ -274,7 +274,7 @@ - name: Ensure no user named 'sally' exists at all community.mysql.mysql_user: name: sally - host_all: yes + host_all: true state: absent - name: Specify grants composed of more than one word @@ -306,7 +306,7 @@ password: 12345 priv: "*.*:USAGE" state: present - sql_log_bin: no + sql_log_bin: false - name: Create user 'bob' authenticated with plugin 'AWSAuthenticationPlugin' community.mysql.mysql_user: @@ -326,7 +326,7 @@ - name: Ensure bob does not have the DELETE privilege community.mysql.mysql_user: name: bob - subtract_privs: yes + subtract_privs: true priv: 'db1.*': DELETE diff --git a/plugins/modules/mysql_variables.py b/plugins/modules/mysql_variables.py index 2544e8d2..dc54c822 100644 --- a/plugins/modules/mysql_variables.py +++ b/plugins/modules/mysql_variables.py @@ -22,7 +22,7 @@ description: - Variable name to operate. type: str - required: yes + required: true value: description: - If set, then sets variable value to this.