From e547cc23eba85472601075bcf216b3e73d0b552c Mon Sep 17 00:00:00 2001 From: Grant Schofield Date: Mon, 6 Apr 2020 15:53:47 -0700 Subject: [PATCH] skip humio ctl install option, skil download and copy of humio jar if version exists --- tasks/main.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 7846e19..4e4ae40 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -75,6 +75,13 @@ notify: Restart Humio when: humio_cache_path is defined +- name: Check Humio jar + tags: humio-update + check_mode: no + stat: + path: "/usr/lib/humio/server-{{ humio_version }}.jar" + register: humio_version_check + - name: Download Humio jar tags: humio-update check_mode: no @@ -82,7 +89,7 @@ url: "{{ humio_mirror }}/com/humio/server/{{ humio_version }}/server-{{ humio_version }}.jar" dest: "/usr/lib/humio/server-{{ humio_version }}.jar" notify: Restart Humio - when: humio_mirror != 'master' + when: humio_mirror != 'master' and not humio_version_check.stat.exists - name: Push Humio jar tags: humio-update @@ -91,7 +98,7 @@ src: "server-{{ humio_version }}.jar" dest: "/usr/lib/humio/server-{{ humio_version }}.jar" notify: Restart Humio - when: humio_mirror == 'master' + when: humio_mirror != 'master' and not humio_version_check.stat.exists - name: Humio server jar permissions tags: humio-update @@ -189,3 +196,4 @@ src: "/usr/lib/humio/humioctl-{{ humioctl_version }}/humioctl" dest: "/usr/bin/humioctl" state: link + when: skip_humio_ctl_install is not defined