mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-04 05:04:23 -07:00
fixed changelog
This commit is contained in:
parent
abcf154dcd
commit
5576489ca7
3 changed files with 15 additions and 6 deletions
|
@ -1,2 +1,2 @@
|
||||||
minor_change:
|
minor_change:
|
||||||
- mysql_user - added the context_db boolean option to set the default database context for the queries to be the ``mysql`` database. This way replication/binlog filters can catch the statements (https://github.com/ansible-collections/community.mysql/issues/265).
|
- mysql_user - added the force_context boolean option to set the default database context for the queries to be the ``mysql`` database. This way replication/binlog filters can catch the statements (https://github.com/ansible-collections/community.mysql/issues/265).
|
||||||
|
|
|
@ -74,10 +74,16 @@ options:
|
||||||
- Whether binary logging should be enabled or disabled for the connection.
|
- Whether binary logging should be enabled or disabled for the connection.
|
||||||
type: bool
|
type: bool
|
||||||
default: yes
|
default: yes
|
||||||
db_context:
|
force_context:
|
||||||
description:
|
description:
|
||||||
- Sets the С(mysql) system database as context for the executed statements (it will be used as a database to connect to). Useful if you use
|
- Sets the С(mysql) system database as context for the executed statements (it will be used
|
||||||
binlog / replication filters in MySQL.
|
as a database to connect to). Useful if you use binlog / replication filters in MySQL as
|
||||||
|
per default the statements can not be caught by a binlog / replication filter, they require
|
||||||
|
a database to be set to work.
|
||||||
|
- see U(https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#option_mysqld_binlog-ignore-db)
|
||||||
|
for a description on how binlog filters work (filtering on the primary).
|
||||||
|
- 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
|
type: bool
|
||||||
default: no
|
default: no
|
||||||
version_added: '3.1.0'
|
version_added: '3.1.0'
|
||||||
|
@ -348,7 +354,7 @@ def main():
|
||||||
plugin_hash_string=dict(default=None, type='str'),
|
plugin_hash_string=dict(default=None, type='str'),
|
||||||
plugin_auth_string=dict(default=None, type='str'),
|
plugin_auth_string=dict(default=None, type='str'),
|
||||||
resource_limits=dict(type='dict'),
|
resource_limits=dict(type='dict'),
|
||||||
db_context=dict(type='bool', default=False),
|
force_context=dict(type='bool', default=False),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=argument_spec,
|
argument_spec=argument_spec,
|
||||||
|
@ -374,7 +380,7 @@ def main():
|
||||||
ssl_ca = module.params["ca_cert"]
|
ssl_ca = module.params["ca_cert"]
|
||||||
check_hostname = module.params["check_hostname"]
|
check_hostname = module.params["check_hostname"]
|
||||||
db = ''
|
db = ''
|
||||||
if module.params["db_context"]:
|
if module.params["force_context"]:
|
||||||
db = 'mysql'
|
db = 'mysql'
|
||||||
sql_log_bin = module.params["sql_log_bin"]
|
sql_log_bin = module.params["sql_log_bin"]
|
||||||
plugin = module.params["plugin"]
|
plugin = module.params["plugin"]
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
<<: *mysql_params
|
<<: *mysql_params
|
||||||
name: '{{ user_name_1 }}'
|
name: '{{ user_name_1 }}'
|
||||||
state: absent
|
state: absent
|
||||||
|
force_context: yes
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: create user with ssl requirement
|
- name: create user with ssl requirement
|
||||||
|
@ -38,6 +39,7 @@
|
||||||
name: "{{ user_name_1 }}"
|
name: "{{ user_name_1 }}"
|
||||||
password: "{{ user_password_1 }}"
|
password: "{{ user_password_1 }}"
|
||||||
priv: '*.*:ALL,GRANT'
|
priv: '*.*:ALL,GRANT'
|
||||||
|
force_context: yes
|
||||||
tls_requires:
|
tls_requires:
|
||||||
SSL:
|
SSL:
|
||||||
|
|
||||||
|
@ -84,3 +86,4 @@
|
||||||
name: '{{ user_name_1 }}'
|
name: '{{ user_name_1 }}'
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
state: absent
|
state: absent
|
||||||
|
force_context: yes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue