Files
ansible/roles/garage/tasks/main.yml

28 lines
663 B
YAML

---
- name: install garage
get_url:
url: "{{ garage_url }}"
dest: "{{ garage_bin }}"
owner: root
group: root
mode: 0755
force: true
notify:
- restart garage
- name: install garage systemd file
template:
src: garage.service.j2
dest: /etc/systemd/system/garage.service
- name: put garage.toml conf file
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