Update to 2022-08-06 12:00

This commit is contained in:
Daniel Berteaud
2022-08-06 12:00:17 +02:00
parent 09f3d86b12
commit cb2305c394
4 changed files with 26 additions and 4 deletions

View File

@@ -5,12 +5,16 @@
tags: nomad
- name: Snapshot nomad data
command: "{{ nomad_root_dir }}/bin/nomad operator save {{ nomad_root_dir }}/archives/{{ nomad_current_version }}/nomad.snap"
command: "{{ nomad_root_dir }}/bin/nomad operator snapshot save {{ nomad_root_dir }}/archives/{{ nomad_current_version }}/nomad.snap"
args:
creates: "{{ nomad_root_dir }}/archives/{{ nomad_current_version }}/nomad.snap"
environment:
NOMAD_TOKEN: "{{ nomad_mgm_token | default(omit) }}"
tags: nomad
- name: Backup previous version
synchronize:
src: "{{ item }}"
src: "{{ nomad_root_dir }}/{{ item }}"
dest: "{{ nomad_root_dir }}/archives/{{ nomad_current_version }}/"
compress: False
delegate_to: "{{ inventory_hostname }}"

View File

@@ -32,6 +32,7 @@
- when: nomad_bin.stat.exists and nomad_current_version != nomad_version
set_fact: nomad_install_mode='upgrade'
tags: nomad
- name: Build a list of enabled task drivers
set_fact: nomad_enabled_task_drivers={{ nomad_conf.client.task_drivers | dict2items | selectattr('value.enabled', 'equalto', True) | map(attribute='key') }}