ansible-roles/roles/nomad/tasks/archive_pre.yml

22 lines
557 B
YAML
Raw Normal View History

2022-07-21 01:00:17 +02:00
---
- name: Create the archive dir
file: path={{ nomad_root_dir }}/archives/{{ nomad_current_version }} state=directory
tags: nomad
2022-08-03 16:00:16 +02:00
- name: Snapshot nomad data
command: "{{ nomad_root_dir }}/bin/nomad operator save {{ nomad_root_dir }}/archives/{{ nomad_current_version }}/nomad.snap"
tags: nomad
2022-07-21 01:00:17 +02:00
- name: Backup previous version
2022-08-03 16:00:16 +02:00
synchronize:
src: "{{ item }}"
dest: "{{ nomad_root_dir }}/archives/{{ nomad_current_version }}/"
compress: False
delegate_to: "{{ inventory_hostname }}"
loop:
- bin
- plugins
2022-07-21 01:00:17 +02:00
tags: nomad