Update to 2022-08-06 13:00

This commit is contained in:
Daniel Berteaud
2022-08-06 13:00:16 +02:00
parent cb2305c394
commit 99b21a541e
9 changed files with 59 additions and 9 deletions

View File

@@ -6,3 +6,9 @@
- "{{ nomad_root_dir }}/tmp/nomad_{{ nomad_version }}_linux_amd64.zip"
- "{{ nomad_root_dir }}/tmp/nomad"
tags: nomad
- name: Remove temporary plugin files
file: path={{ item.dest }} state=absent
loop: "{{ nomad_plugin_dl.results }}"
when: nomad_plugin_dl is defined and nomad_plugin_dl.results is defined and item.dest is defined
tags: nomad

View File

@@ -62,8 +62,27 @@
dest: "{{ nomad_root_dir }}/plugins/"
remote_src: True
loop: "{{ nomad_plugin_dl.results }}"
when: item.dest | basename | splitext | last in ['.zip','.tgz', '.txz', '.tar.gz', '.tar.xz']
notify: restart nomad
- name: Copy nomad plugins
copy:
src: "{{ item.dest }}"
dest: "{{ nomad_root_dir }}/plugins/"
remote_src: True
loop: "{{ nomad_plugin_dl.results }}"
when: item.dest | basename | splitext | last not in ['.zip','.tgz', '.txz', '.tar.gz', '.tar.xz']
notify: restart nomad
- name: List installed plugins
command: ls {{ nomad_root_dir }}/plugins/
register: nomad_installed_plugins
changed_when: False
- name: Set permissions on plugins
file: path={{ nomad_root_dir }}/plugins/{{ item }} owner=root group=root mode=755
loop: "{{ nomad_installed_plugins.stdout_lines }}"
tags: nomad
# Nomad looks for the qemu-system-x86_64 bin in $PATH