feat: automatic replication mode for garage

This commit is contained in:
VC
2024-07-05 11:53:31 +02:00
parent 2cb46eac1d
commit 93da538013
2 changed files with 3 additions and 2 deletions

View File

@@ -2,5 +2,3 @@
garage_version: v0.8.1
garage_arch: x86_64
garage_replication_mode: 1

View File

@@ -20,5 +20,8 @@
template:
src: garage.toml.j2
dest: /etc/garage.toml
vars:
cluster_group: "{{ group_names | map('regex_search', '.+_cluster') | select('string') | first }}"
garage_replication_mode: "{{ groups[cluster_group] | length if (groups[cluster_group]|length) <=3 else 3 }}"
notify:
- restart garage