From 8f0cafa5fac3019a386d3aa09d6125cd3c8fe007 Mon Sep 17 00:00:00 2001 From: Ivan Usov Date: Thu, 14 Aug 2025 11:20:48 +0200 Subject: [PATCH] Disable redis protected-mode on rhel9 --- tasks/main.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tasks/main.yaml b/tasks/main.yaml index 5d92db6..d6ce8c1 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -8,6 +8,15 @@ notify: - Restart redis +- name: Disable redis protected-mode on rhel9 + ansible.builtin.lineinfile: + path: /etc/redis/redis.conf + regexp: '^protected-mode ' + line: protected-mode no + when: ansible_distribution_major_version == "9" + notify: + - Restart redis + - name: Edit redis config on rhel8 ansible.builtin.lineinfile: path: /etc/redis.conf