mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-16 02:03:09 +02:00
Update to 2022-08-02 18:00
This commit is contained in:
parent
66a4b737df
commit
e6e442e0fb
@ -53,3 +53,9 @@
|
|||||||
when: nomad_unit.changed
|
when: nomad_unit.changed
|
||||||
tags: nomad
|
tags: nomad
|
||||||
|
|
||||||
|
- name: Install backup hooks
|
||||||
|
template: src={{ item }}-backup.j2 dest=/etc/backup/{{ item }}.d/nomad mode=755
|
||||||
|
loop:
|
||||||
|
- pre
|
||||||
|
- post
|
||||||
|
tags: nomad
|
||||||
|
5
roles/nomad/templates/post-backup.j2
Normal file
5
roles/nomad/templates/post-backup.j2
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
rm -f {{ nomad_root_dir }}/backup/nomad.snap
|
5
roles/nomad/templates/pre-backup.j2
Normal file
5
roles/nomad/templates/pre-backup.j2
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
{{ nomad_root_dir }}/bin/nomad operator snapshot save {{ nomad_root_dir }}/backup/nomad.snap
|
Loading…
x
Reference in New Issue
Block a user