diff --git a/ansible/host_vars/oscar b/ansible/host_vars/oscar index 553c716..93c30e8 100644 --- a/ansible/host_vars/oscar +++ b/ansible/host_vars/oscar @@ -15,7 +15,6 @@ wireguard_postdown: - iptables -D FORWARD -i wg0 -j ACCEPT - iptables -D FORWARD -o wg0 -j ACCEPT - iptables -t nat -D POSTROUTING -o enp2s0 -j MASQUERADE -consul_snapshot: True partition_table: - device: "/dev/sda" diff --git a/ansible/host_vars/oscar-dev b/ansible/host_vars/oscar-dev index 225bc63..3600348 100644 --- a/ansible/host_vars/oscar-dev +++ b/ansible/host_vars/oscar-dev @@ -12,4 +12,3 @@ wireguard_postdown: - iptables -D FORWARD -i wg0 -j ACCEPT - iptables -D FORWARD -o wg0 -j ACCEPT - iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE -consul_snapshot: True diff --git a/nomad-job/consul-backup.nomad b/nomad-job/consul-backup.nomad new file mode 100644 index 0000000..a65fb4f --- /dev/null +++ b/nomad-job/consul-backup.nomad @@ -0,0 +1,36 @@ + +job "consul-backup" { + datacenters = ["homelab"] + priority = 50 + type = "batch" + meta { + forcedeploy = "0" + } + + constraint { + attribute = "${attr.cpu.arch}" + value = "amd64" + } + periodic { + crons = ["30 3 * * *"] + prohibit_overlap = true + } + group "consul-backup" { + network { + mode = "host" + } + task "consul-backup" { + driver = "docker" + config { + image = "ducampsv/docker-consul-backup:latest" + volumes = [ + "/mnt/diskstation/git/backup/consul:/backup" + ] + } + resources { + memory = 100 + } + } + + } +}