--- - name: Ensure sentinel config exists copy: content: "" dest: "/etc/redis/sentinel.conf" force: no owner: redis group: redis mode: 0640 - name: Template redis-sentinel config blockinfile: block: "{{ lookup('template', '{{ ansible_os_family }}/etc/redis/sentinel.conf.j2') }}" path: "/etc/redis/sentinel.conf" notify: - Restart redis-sentinel