mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-06 10:40:36 -07:00
Backport issue-28 check for tls support
This commit is contained in:
parent
b4303511d5
commit
efde607d25
6 changed files with 54 additions and 6 deletions
|
@ -1,11 +1,17 @@
|
|||
---
|
||||
- name: set fact tls_enabled
|
||||
command: "{{ mysql_command }} \"-e SHOW VARIABLES LIKE 'have_ssl';\""
|
||||
register: result
|
||||
- set_fact:
|
||||
tls_enabled: "{{ 'YES' in result.stdout | bool | default('false', true) }}"
|
||||
|
||||
- vars:
|
||||
mysql_parameters: &mysql_params
|
||||
login_user: '{{ mysql_user }}'
|
||||
login_password: '{{ mysql_password }}'
|
||||
login_host: 127.0.0.1
|
||||
login_port: '{{ mysql_primary_port }}'
|
||||
|
||||
when: tls_enabled
|
||||
block:
|
||||
|
||||
# ============================================================
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
---
|
||||
- name: alias mysql command to include default options
|
||||
set_fact:
|
||||
mysql_command: "mysql -u{{ mysql_user }} -p{{ mysql_password }} -P{{ mysql_primary_port }} --protocol=tcp"
|
||||
|
||||
- name: set fact tls_enabled
|
||||
command: "{{ mysql_command }} \"-e SHOW VARIABLES LIKE 'have_ssl';\""
|
||||
register: result
|
||||
- set_fact:
|
||||
tls_enabled: "{{ 'YES' in result.stdout | bool | default('false', true) }}"
|
||||
|
||||
- vars:
|
||||
mysql_parameters: &mysql_params
|
||||
login_user: '{{ mysql_user }}'
|
||||
login_password: '{{ mysql_password }}'
|
||||
login_host: 127.0.0.1
|
||||
login_port: '{{ mysql_primary_port }}'
|
||||
|
||||
when: tls_enabled
|
||||
block:
|
||||
|
||||
# ============================================================
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
---
|
||||
- name: alias mysql command to include default options
|
||||
set_fact:
|
||||
mysql_command: "mysql -u{{ mysql_user }} -p{{ mysql_password }} -P{{ mysql_primary_port }} --protocol=tcp"
|
||||
|
||||
- name: set fact tls_enabled
|
||||
command: "{{ mysql_command }} \"-e SHOW VARIABLES LIKE 'have_ssl';\""
|
||||
register: result
|
||||
- set_fact:
|
||||
tls_enabled: "{{ 'YES' in result.stdout | bool | default('false', true) }}"
|
||||
|
||||
- vars:
|
||||
mysql_parameters: &mysql_params
|
||||
login_user: '{{ mysql_user }}'
|
||||
login_password: '{{ mysql_password }}'
|
||||
login_host: 127.0.0.1
|
||||
login_port: '{{ mysql_primary_port }}'
|
||||
|
||||
when: tls_enabled
|
||||
block:
|
||||
|
||||
# ============================================================
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
---
|
||||
- name: alias mysql command to include default options
|
||||
set_fact:
|
||||
mysql_command: "mysql -u{{ mysql_user }} -p{{ mysql_password }} -P{{ mysql_primary_port }} --protocol=tcp"
|
||||
|
||||
- name: set fact tls_enabled
|
||||
command: "{{ mysql_command }} \"-e SHOW VARIABLES LIKE 'have_ssl';\""
|
||||
register: result
|
||||
- set_fact:
|
||||
tls_enabled: "{{ 'YES' in result.stdout | bool | default('false', true) }}"
|
||||
|
||||
- vars:
|
||||
mysql_parameters: &mysql_params
|
||||
login_user: '{{ mysql_user }}'
|
||||
login_password: '{{ mysql_password }}'
|
||||
login_host: 127.0.0.1
|
||||
login_port: '{{ mysql_primary_port }}'
|
||||
|
||||
when: tls_enabled
|
||||
block:
|
||||
|
||||
# ============================================================
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
---
|
||||
- name: set fact tls_enabled
|
||||
command: "{{ mysql_command }} \"-e SHOW VARIABLES LIKE 'have_ssl';\""
|
||||
register: result
|
||||
- set_fact:
|
||||
tls_enabled: "{{ 'YES' in result.stdout | bool | default('false', true) }}"
|
||||
|
||||
- vars:
|
||||
mysql_parameters: &mysql_params
|
||||
login_user: '{{ mysql_user }}'
|
||||
login_password: '{{ mysql_password }}'
|
||||
login_host: 127.0.0.1
|
||||
login_port: '{{ mysql_primary_port }}'
|
||||
|
||||
when: tls_enabled
|
||||
block:
|
||||
|
||||
# ============================================================
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
---
|
||||
- name: set fact tls_enabled
|
||||
command: "{{ mysql_command }} \"-e SHOW VARIABLES LIKE 'have_ssl';\""
|
||||
register: result
|
||||
- set_fact:
|
||||
tls_enabled: "{{ 'YES' in result.stdout | bool | default('false', true) }}"
|
||||
|
||||
- vars:
|
||||
mysql_parameters: &mysql_params
|
||||
login_user: '{{ mysql_user }}'
|
||||
login_password: '{{ mysql_password }}'
|
||||
login_host: 127.0.0.1
|
||||
login_port: '{{ mysql_primary_port }}'
|
||||
|
||||
when: tls_enabled
|
||||
block:
|
||||
|
||||
# ============================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue