mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-14 09:13:16 +02:00
19 lines
676 B
YAML
19 lines
676 B
YAML
---
|
|
|
|
- block:
|
|
- name: Detect installed version
|
|
shell: /usr/local/bin/nomad version | perl -ne '/Nomad v(\d+(\.\d+)*)\s.*/ && print "$1\n"'
|
|
changed_when: False
|
|
register: nomad_current_version
|
|
- set_fact: nomad_current_version={{ nomad_current_version.stdout }}
|
|
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') }}
|
|
tags: nomad
|
|
|
|
- name: Check if the consul-template service still exists
|
|
stat: path=/etc/systemd/system/consul-template-nomad
|
|
register: nomad_ct_service
|
|
tags: nomad
|