2022-10-12 10:08:57 +00:00
|
|
|
- hosts: mysql
|
|
|
|
gather_facts: no
|
|
|
|
vars:
|
|
|
|
ansible_python_interpreter: /usr/local/bin/python
|
|
|
|
|
|
|
|
tasks:
|
2022-10-25 10:43:34 +00:00
|
|
|
- name: Get info
|
2022-10-12 10:08:57 +00:00
|
|
|
community.mysql.mysql_info:
|
|
|
|
login_user: "{{ jms_account.username }}"
|
|
|
|
login_password: "{{ jms_account.secret }}"
|
|
|
|
login_host: "{{ jms_asset.address }}"
|
|
|
|
login_port: "{{ jms_asset.port }}"
|
2022-10-25 10:43:34 +00:00
|
|
|
filter: version
|
2022-10-12 10:08:57 +00:00
|
|
|
register: db_info
|
|
|
|
|
2022-10-27 10:53:10 +00:00
|
|
|
- name: Define info by set_fact
|
2022-10-12 10:08:57 +00:00
|
|
|
set_fact:
|
|
|
|
info:
|
|
|
|
version: "{{ db_info.version.full }}"
|
|
|
|
|
|
|
|
- debug:
|
2022-10-25 10:43:34 +00:00
|
|
|
var: info
|