mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-30 03:05:51 +02:00
Update to 2022-07-23 14:00
This commit is contained in:
@@ -70,6 +70,8 @@ consul_base_conf:
|
||||
enabled: "{{ (inventory_hostname in consul_servers) | ternary(True, False) }}"
|
||||
connect:
|
||||
enabled: "{{ (inventory_hostname in consul_servers) | ternary(True, False) }}"
|
||||
performance:
|
||||
raft_multiplier: 1
|
||||
|
||||
# For example
|
||||
# consul_extra_conf:
|
||||
|
@@ -1,6 +1,12 @@
|
||||
---
|
||||
|
||||
- name: Deploy consul configuration
|
||||
template: src=consul.json.j2 dest={{ consul_root_dir }}/etc/consul.json owner=root group={{ consul_user }} mode=640
|
||||
notify: reload consul
|
||||
template:
|
||||
src: consul.json.j2
|
||||
dest: "{{ consul_root_dir }}/etc/consul.json"
|
||||
owner: root
|
||||
group: "{{ consul_user }}"
|
||||
mode: 640
|
||||
validate: consul validate %s
|
||||
notify: restart consul
|
||||
tags: consul
|
||||
|
@@ -53,3 +53,9 @@
|
||||
when: consul_unit.changed
|
||||
tags: consul
|
||||
|
||||
- name: Install backup hooks
|
||||
template: src={{ item }}-backup.j2 dest=/etc/backup/{{ item }}.d/consul mode=755
|
||||
loop:
|
||||
- pre
|
||||
- post
|
||||
tags: consul
|
||||
|
4
roles/consul/templates/post-backup.j2
Normal file
4
roles/consul/templates/post-backup.j2
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eo pipefail
|
||||
rm -f {{ consul_root_dir }}/backup/consul.snap
|
4
roles/consul/templates/pre-backup.j2
Normal file
4
roles/consul/templates/pre-backup.j2
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eo pipefail
|
||||
consul snapshot save {{ consul_root_dir }}/backup/consul.snap
|
Reference in New Issue
Block a user