mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-16 02:03:09 +02:00
22 lines
557 B
YAML
22 lines
557 B
YAML
---
|
|
|
|
- name: Create the archive dir
|
|
file: path={{ nomad_root_dir }}/archives/{{ nomad_current_version }} state=directory
|
|
tags: nomad
|
|
|
|
- name: Snapshot nomad data
|
|
command: "{{ nomad_root_dir }}/bin/nomad operator save {{ nomad_root_dir }}/archives/{{ nomad_current_version }}/nomad.snap"
|
|
tags: nomad
|
|
|
|
- name: Backup previous version
|
|
synchronize:
|
|
src: "{{ item }}"
|
|
dest: "{{ nomad_root_dir }}/archives/{{ nomad_current_version }}/"
|
|
compress: False
|
|
delegate_to: "{{ inventory_hostname }}"
|
|
loop:
|
|
- bin
|
|
- plugins
|
|
tags: nomad
|
|
|