mariadb: add mariadb_datadir_volume parameter

With the parameter ``mariadb_datadir_volume`` it is possible
to use a directory as volume for the mariadb service. By default,
a volume named mariadb is used (the previous default).

Change-Id: Ic61fe981825c5fa6f50e53c9555b6a102f42f522
This commit is contained in:
Christian Berendt 2023-03-06 23:45:23 +01:00
parent 308089bb64
commit b327ae4a56
3 changed files with 9 additions and 1 deletions

View File

@ -392,6 +392,8 @@ mariadb_sst_port: "4444"
mariadb_clustercheck_port: "4569"
mariadb_monitor_user: "{{ 'monitor' if enable_proxysql | bool else 'haproxy' }}"
mariadb_datadir_volume: "mariadb"
mariadb_default_database_shard_id: 0
mariadb_default_database_shard_hosts: "{% set default_shard = [] %}{% for host in groups['mariadb'] %}{% if hostvars[host]['mariadb_shard_id'] is not defined or hostvars[host]['mariadb_shard_id'] == mariadb_default_database_shard_id %}{{ default_shard.append(host) }}{% endif %}{% endfor %}{{ default_shard }}"
mariadb_shard_id: "{{ mariadb_default_database_shard_id }}"

View File

@ -82,7 +82,7 @@ mariadb_default_volumes:
- "{{ node_config_directory }}/mariadb/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
- "mariadb:/var/lib/mysql"
- "{{ mariadb_datadir_volume }}:/var/lib/mysql"
- "kolla_logs:/var/log/kolla/"
mariadb_clustercheck_default_volumes:
- "{{ node_config_directory }}/mariadb-clustercheck/:{{ container_config_directory }}/:ro"

View File

@ -0,0 +1,6 @@
---
features:
- |
With the parameter ``mariadb_datadir_volume`` it is possible
to use a directory as volume for the mariadb service. By default,
a volume named mariadb is used (the previous default).