|
153 | 153 | - "{{ redis_sentinel_configuration_file }}" |
154 | 154 | - "{{ redis_server_configuration_file }}" |
155 | 155 |
|
156 | | -- name: Configure Redis and Sentinel. |
| 156 | +- name: Configure Redis Server. |
157 | 157 | become: yes |
158 | 158 | ansible.builtin.blockinfile: |
159 | | - block: "{{ lookup('ansible.builtin.template', item.template_file) }}" |
160 | | - path: "{{ item.path }}" |
| 159 | + block: "{{ lookup('ansible.builtin.template', 'redis.conf.j2') }}" |
| 160 | + path: "{{ redis_server_configuration_file }}" |
161 | 161 | insertbefore: "# Generated by CONFIG REWRITE" |
162 | 162 | create: true |
163 | 163 | mode: 0600 |
164 | 164 | owner: "{{ redis_user }}" |
165 | 165 | group: "{{ redis_group }}" |
166 | 166 | notify: Restart Redis Server |
167 | | - loop: |
168 | | - - { template_file: "redis.conf.j2", path: "{{ redis_server_configuration_file }}" } |
169 | | - - { template_file: "sentinel.conf.j2", path: "{{ redis_sentinel_configuration_file }}" } |
| 167 | + |
| 168 | +- name: Configure Redis Sentinel. |
| 169 | + become: yes |
| 170 | + ansible.builtin.blockinfile: |
| 171 | + block: "{{ lookup('ansible.builtin.template', 'sentinel.conf.j2') }}" |
| 172 | + path: "{{ redis_sentinel_configuration_file }}" |
| 173 | + insertbefore: "# Generated by CONFIG REWRITE" |
| 174 | + create: true |
| 175 | + mode: 0600 |
| 176 | + owner: "{{ redis_user }}" |
| 177 | + group: "{{ redis_group }}" |
| 178 | + notify: Restart Redis Sentinel |
170 | 179 |
|
171 | 180 | - name: Create Redis Lib Directory. |
172 | 181 | become: yes |
|
0 commit comments