ansible-mysql/molecule/_shared/converge.yml

35 lines
797 B
YAML
Raw Normal View History

2024-08-26 19:59:55 +07:00
---
# Note: master must be converged first
- name: Converge master
hosts: master
gather_facts: true
tasks:
- name: Include role
ansible.builtin.include_role:
name: "hanxhx.mysql"
- name: COPY | Deploy first dump
ansible.builtin.copy:
src: files/import1.sql
dest: /tmp/import1.sql
mode: 0644
owner: root
group: root
- name: MYSQL_DB | Import first dump
community.mysql.mysql_db:
name: "{{ item }}"
state: import
target: /tmp/import1.sql
login_unix_socket: "/run/mysqld/mysqld.sock"
loop: "{{ mariadb_databases }}"
- name: Converge slave
hosts: slave
gather_facts: true
tasks:
- name: Include role
ansible.builtin.include_role:
name: "hanxhx.mysql"