mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-29 01:11:46 -07:00
initial commit
This commit is contained in:
parent
9fcbbaad81
commit
76a1adffef
108 changed files with 8729 additions and 42 deletions
|
@ -0,0 +1,48 @@
|
|||
# Copyright: (c) 2019, Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
# Needs for further tests:
|
||||
- name: Stop slave
|
||||
mysql_replication:
|
||||
login_host: 127.0.0.1
|
||||
login_port: "{{ standby_port }}"
|
||||
mode: stopslave
|
||||
|
||||
- name: Reset slave all
|
||||
mysql_replication:
|
||||
login_host: 127.0.0.1
|
||||
login_port: "{{ standby_port }}"
|
||||
mode: resetslaveall
|
||||
|
||||
# Get master initial status:
|
||||
- name: Get master status
|
||||
mysql_replication:
|
||||
login_host: 127.0.0.1
|
||||
login_port: "{{ master_port }}"
|
||||
mode: getmaster
|
||||
register: master_initial_status
|
||||
|
||||
# Test resetmaster mode:
|
||||
- name: Reset master
|
||||
mysql_replication:
|
||||
login_host: 127.0.0.1
|
||||
login_port: "{{ master_port }}"
|
||||
mode: resetmaster
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
- result.queries == ["RESET MASTER"]
|
||||
|
||||
# Get master final status:
|
||||
- name: Get master status
|
||||
mysql_replication:
|
||||
login_host: 127.0.0.1
|
||||
login_port: "{{ master_port }}"
|
||||
mode: getmaster
|
||||
register: master_final_status
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- master_initial_status.File != master_final_status.File
|
Loading…
Add table
Add a link
Reference in a new issue