From e04f559976331fe41a4d40ec2c53ccb21be23a52 Mon Sep 17 00:00:00 2001 From: Jan Kurik Date: Thu, 20 Jun 2024 14:10:26 +0200 Subject: [PATCH] fix: Do not load RediSearch on non x86_64 Fedoras --- roles/redis/tasks/main.yml | 4 ++++ roles/redis/vars/Fedora.yml | 7 ++----- roles/redis/vars/Fedora_x86_64.yml | 9 +++++++++ 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 roles/redis/vars/Fedora_x86_64.yml diff --git a/roles/redis/tasks/main.yml b/roles/redis/tasks/main.yml index 7321af2..886b86d 100644 --- a/roles/redis/tasks/main.yml +++ b/roles/redis/tasks/main.yml @@ -6,9 +6,13 @@ loop: - "{{ role_path }}/vars/default.yml" - "{{ role_path }}/vars/{{ ansible_facts['os_family'] }}.yml" + - "{{ role_path }}/vars/{{ ansible_facts['os_family'] }}_{{ ansible_facts['ansible_architecture'] }}.yml" - "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}.yml" + - "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}_{{ ansible_facts['ansible_architecture'] }}.yml" - "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}_{{ ansible_facts['distribution_major_version'] }}.yml" + - "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}_{{ ansible_facts['distribution_major_version'] }}_{{ ansible_facts['ansible_architecture'] }}.yml" - "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}_{{ ansible_facts['distribution_version'] }}.yml" + - "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}_{{ ansible_facts['distribution_version'] }}_{{ ansible_facts['ansible_architecture'] }}.yml" when: item is file # yamllint enable rule:line-length diff --git a/roles/redis/vars/Fedora.yml b/roles/redis/vars/Fedora.yml index 7654048..eb1c4a6 100644 --- a/roles/redis/vars/Fedora.yml +++ b/roles/redis/vars/Fedora.yml @@ -2,8 +2,5 @@ --- # Put internal variables here with Fedora specific values. -__redis_packages_extra: - - RediSearch - -__redis_loaded_modules: - - /usr/lib64/redis/modules/redisearch.so +__redis_packages_extra: [] +__redis_loaded_modules: [] diff --git a/roles/redis/vars/Fedora_x86_64.yml b/roles/redis/vars/Fedora_x86_64.yml new file mode 100644 index 0000000..7d44e42 --- /dev/null +++ b/roles/redis/vars/Fedora_x86_64.yml @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: MIT +--- +# Put internal variables here with Fedora on x86_64 specific values. + +__redis_packages_extra: + - RediSearch + +__redis_loaded_modules: + - /usr/lib64/redis/modules/redisearch.so