Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #23 from humio/grant/version-check
Browse files Browse the repository at this point in the history
Skip download if version is the same
  • Loading branch information
schofield authored Apr 6, 2020
2 parents 41184e4 + e547cc2 commit 1a25585
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
humio_host_id: 0
humio_version: 1.8.6
humio_version: 1.8.9
humioctl_version: 0.23.0
humio_mirror: https://repo.humio.com/repository/maven-public
humio_public_url: "http://{{ ansible_default_ipv4.address }}"
Expand Down
12 changes: 10 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,21 @@
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
get_url:
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
Expand All @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 1a25585

Please sign in to comment.