mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-06 10:40:36 -07:00
mysql_info: add server_engine return value (#649)
* mysql_info: add server_engine return value * Incorporate feedback
This commit is contained in:
parent
0bc3e3d848
commit
f266ba59c9
3 changed files with 10 additions and 0 deletions
2
changelogs/fragments/1-mysql_info.yml
Normal file
2
changelogs/fragments/1-mysql_info.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- mysql_info - return a database server engine used (https://github.com/ansible-collections/community.mysql/issues/644).
|
|
@ -162,6 +162,12 @@ EXAMPLES = r'''
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r'''
|
||||||
|
server_engine:
|
||||||
|
description: Database server engine.
|
||||||
|
returned: if not excluded by filter
|
||||||
|
type: str
|
||||||
|
sample: 'MariaDB'
|
||||||
|
version_added: '3.10.0'
|
||||||
version:
|
version:
|
||||||
description: Database server version.
|
description: Database server version.
|
||||||
returned: if not excluded by filter
|
returned: if not excluded by filter
|
||||||
|
@ -765,6 +771,7 @@ def main():
|
||||||
mysql = MySQL_Info(module, cursor, server_implementation, user_implementation)
|
mysql = MySQL_Info(module, cursor, server_implementation, user_implementation)
|
||||||
|
|
||||||
module.exit_json(changed=False,
|
module.exit_json(changed=False,
|
||||||
|
server_engine='MariaDB' if server_implementation == 'mariadb' else 'MySQL',
|
||||||
connector_name=connector_name,
|
connector_name=connector_name,
|
||||||
connector_version=connector_version,
|
connector_version=connector_version,
|
||||||
**mysql.get_info(filter_, exclude_fields, return_empty_dbs))
|
**mysql.get_info(filter_, exclude_fields, return_empty_dbs))
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
- result.databases != {}
|
- result.databases != {}
|
||||||
- result.engines != {}
|
- result.engines != {}
|
||||||
- result.users != {}
|
- result.users != {}
|
||||||
|
- result.server_engine == 'MariaDB' or result.server_engine == 'MySQL'
|
||||||
|
|
||||||
- name: mysql_info - Test connector informations display
|
- name: mysql_info - Test connector informations display
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
|
|
Loading…
Add table
Reference in a new issue