Update to 2022-08-30 12:00

This commit is contained in:
Daniel Berteaud
2022-08-30 12:00:15 +02:00
parent af54ca5dc1
commit 2bb38da306
8 changed files with 19 additions and 10 deletions

View File

@@ -8,7 +8,10 @@
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"
when: nomad_conf.server.enabled
when:
- nomad_conf.server.enabled
- nomad_services.ansible_facts.services['nomad.service'] is defined
- nomad_services.ansible_facts.services['nomad.service'].state == 'started'
environment:
NOMAD_TOKEN: "{{ nomad_mgm_token | default(omit) }}"
tags: nomad

View File

@@ -38,4 +38,7 @@
set_fact: nomad_enabled_task_drivers={{ nomad_conf.client.task_drivers | dict2items | selectattr('value.enabled', 'equalto', True) | map(attribute='key') }}
tags: nomad
- name: Check the state of the services
service_facts:
register: nomad_services
tags: nomad