mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-01 19:54:26 -07:00
Refactor setup_mysql into setup_controller
This commit is contained in:
parent
405b809a86
commit
7049a280cb
15 changed files with 16 additions and 56 deletions
|
@ -1,37 +0,0 @@
|
|||
---
|
||||
|
||||
- name: "{{ role_name }} | setvars | Extract Podman/Docker Network Gateway"
|
||||
ansible.builtin.shell:
|
||||
cmd: ip route|grep default|awk '{print $3}'
|
||||
register: ip_route_output
|
||||
|
||||
- name: "{{ role_name }} | setvars | Set Fact"
|
||||
ansible.builtin.set_fact:
|
||||
connector_name: "{{ connector.name.0 }}"
|
||||
gateway_addr: "{{ ip_route_output.stdout }}"
|
||||
db_engine: "{{ db_engine_version | split(':') | first }}"
|
||||
db_version: "{{ db_engine_version | split(':') | last }}"
|
||||
|
||||
- name: "{{ role_name }} | setvars | Set Fact using above facts"
|
||||
ansible.builtin.set_fact:
|
||||
connector_ver: "{{ connector_name.split('=')[2].strip() }}"
|
||||
mysql_command: >-
|
||||
mysql
|
||||
-h{{ gateway_addr }}
|
||||
-P{{ mysql_primary_port }}
|
||||
-u{{ mysql_user }}
|
||||
-p{{ mysql_password }}
|
||||
--protocol=tcp
|
||||
mysql_command_wo_port: >-
|
||||
mysql
|
||||
-h{{ gateway_addr }}
|
||||
-u{{ mysql_user }}
|
||||
-p{{ mysql_password }}
|
||||
--protocol=tcp
|
||||
|
||||
- name: "{{ role_name }} | setvars | Debug connector info"
|
||||
ansible.builtin.debug:
|
||||
msg: >
|
||||
Connector name: {{ connector_name }},
|
||||
Connector version: {{ connector_ver }}
|
||||
db_engine: {{ db_engine }}
|
Loading…
Add table
Add a link
Reference in a new issue