diff --git a/defaults/main.yml b/defaults/main.yml index ea7e31f..ed2b79f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -38,6 +38,10 @@ humio_working_dir: "{{ humio_data_path }}/{{ humio_host_id }}-%i" humio_data_percentage: 80 humio_data_secondary_path: ~ + +humio_cache_percentage: 90 +humio_cache_path: ~ + humio_permissions: ~ humio_processes: "{{ ansible_local.numanodes | length }}" diff --git a/tasks/main.yml b/tasks/main.yml index 0f6ad55..7846e19 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -64,6 +64,17 @@ notify: Restart Humio when: humio_data_secondary_path is defined +- name: Create Humio cache directories + file: + path: "{{ humio_cache_path }}/{{ humio_host_id }}-{{ item }}" + state: directory + owner: "humio" + group: "humio" + mode: 0755 + loop: "{{ range(0, humio_processes|int)|list }}" + notify: Restart Humio + when: humio_cache_path is defined + - name: Download Humio jar tags: humio-update check_mode: no diff --git a/templates/server.conf.j2 b/templates/server.conf.j2 index 9082521..b9cb5d7 100644 --- a/templates/server.conf.j2 +++ b/templates/server.conf.j2 @@ -5,6 +5,10 @@ DIRECTORY={{ humio_data_paths[item|string] }}/{{ humio_host_id }}-{{ item }}/dat PRIMARY_STORAGE_PERCENTAGE={{ humio_data_percentage }} SECONDARY_DATA_DIRECTORY={{ humio_data_secondary_path }}/{{ humio_host_id }}-{{ item }}/data {%- endif %} +{%- if humio_cache_path %} +CACHE_STORAGE_DIRECTORY={{ humio_cache_path }} +CACHE_STORAGE_PERCENTAGE={{ humio_cache_percentage }} +{%- endif %} HUMIO_AUDITLOG_DIR=/var/log/humio/{{ item }} HUMIO_DEBUGLOG_DIR=/var/log/humio/{{ item }} HUMIO_PORT={{ 8080 + item }}