mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-02-24 10:13:30 +07:00
🚀 Upstream management on molecule
This commit is contained in:
committed by
Emilien M
parent
9a79dd8d63
commit
5e26a65e8e
@@ -25,9 +25,7 @@ provisioner:
|
||||
connection:
|
||||
pipelining: true
|
||||
playbooks:
|
||||
converge: ../_shared/converge.yml
|
||||
prepare: ../_shared/prepare.yml
|
||||
verify: ../_shared/verify.yml
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
|
||||
@@ -6,3 +6,4 @@ mariadb_extra_configuration:
|
||||
mariadb_install_xtrabackup_package: true
|
||||
mariadb_slow_query_log_enabled: true
|
||||
mariadb_debug_role: true
|
||||
mariadb_innodb_buffer_pool_size: 128M
|
||||
|
||||
4
molecule/_shared/inventory/group_vars/upstream.yml
Normal file
4
molecule/_shared/inventory/group_vars/upstream.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
mariadb_version: '11.2'
|
||||
mariadb_origin: 'upstream'
|
||||
9
molecule/debian12_upstream/converge.yml
Normal file
9
molecule/debian12_upstream/converge.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
|
||||
- name: Converge
|
||||
hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- name: Include role
|
||||
ansible.builtin.include_role:
|
||||
name: "hanxhx.mysql"
|
||||
15
molecule/debian12_upstream/molecule.yml
Normal file
15
molecule/debian12_upstream/molecule.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
|
||||
platforms:
|
||||
- name: debian12-upstream1
|
||||
image: dokken/debian-12
|
||||
command: /lib/systemd/systemd
|
||||
dockerfile: ../_shared/Dockerfile.j2
|
||||
capabilities:
|
||||
- SYS_ADMIN
|
||||
cgroupns_mode: host
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
||||
privileged: true
|
||||
groups:
|
||||
- upstream
|
||||
11
molecule/debian12_upstream/verify.yml
Normal file
11
molecule/debian12_upstream/verify.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
|
||||
- name: Verify slave
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: COMMAND | Check if mariadb is running
|
||||
ansible.builtin.command: "systemctl is-active mariadb"
|
||||
register: mariadb_is_running
|
||||
changed_when: false
|
||||
failed_when: mariadb_is_running.rc != 0
|
||||
Reference in New Issue
Block a user