mysql_info: add server_engine return value (#649)

* mysql_info: add server_engine return value

* Incorporate feedback
This commit is contained in:
Andrew Klychkov 2024-06-19 10:17:02 +02:00 committed by GitHub
parent 0bc3e3d848
commit f266ba59c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- mysql_info - return a database server engine used (https://github.com/ansible-collections/community.mysql/issues/644).

View file

@ -162,6 +162,12 @@ EXAMPLES = 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:
description: Database server version.
returned: if not excluded by filter
@ -765,6 +771,7 @@ def main():
mysql = MySQL_Info(module, cursor, server_implementation, user_implementation)
module.exit_json(changed=False,
server_engine='MariaDB' if server_implementation == 'mariadb' else 'MySQL',
connector_name=connector_name,
connector_version=connector_version,
**mysql.get_info(filter_, exclude_fields, return_empty_dbs))

View file

@ -56,6 +56,7 @@
- result.databases != {}
- result.engines != {}
- result.users != {}
- result.server_engine == 'MariaDB' or result.server_engine == 'MySQL'
- name: mysql_info - Test connector informations display
ansible.builtin.import_tasks: