feat: turns root_domain into var

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

View File

@@ -10,3 +10,5 @@ garage_rpc_secret: !vault |
39663439303466613337376162646131373863666632626638653837386432633339326235376634
34303565306134316464363931633933336139323933613133346665313836356634663139353061
66386436626362316531
garage_root_domain: ".garage.mateu.be"

View File

@@ -22,6 +22,7 @@
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 }}"
cluster_group_length: "{{ groups[cluster_group] | reject('search', 'gw') | length }}"
garage_replication_mode: "{{ cluster_group_length | int if (cluster_group_length | int) <= 3 else 3 }}"
notify:
- restart garage

View File

@@ -13,8 +13,8 @@ rpc_secret = "{{ garage_rpc_secret }}"
[s3_api]
s3_region = "garage"
api_bind_addr = "[::]:3900"
root_domain = ".garage.mateu.be"
root_domain = "{{ garage_root_domain }}"
[s3_web]
bind_addr = "[::1]:3902"
root_domain = ".garage.mateu.be"
root_domain = "{{ garage_root_domain }}"