ansible-role-nextcloud/tasks/redis.yml

24 lines
771 B
YAML
Raw Normal View History

2020-12-03 23:54:55 +01:00
---
- name: "Redis | Aktiviere Socket"
ansible.builtin.lineinfile:
2021-08-07 16:45:32 +02:00
path: "{{ redis_config_file }}"
2020-12-03 23:54:55 +01:00
regexp: '^# unixsocket /var/run/redis/redis-server.sock'
line: 'unixsocket /var/run/redis/redis-server.sock'
- name: "Redis | Setze Socket-Berechtigungen"
ansible.builtin.lineinfile:
2021-08-07 16:45:32 +02:00
path: "{{ redis_config_file }}"
2020-12-03 23:54:55 +01:00
regexp: '^# unixsocketperm 700'
line: 'unixsocketperm 770'
2021-08-07 16:45:32 +02:00
- name: "Redis | Ermittle Anzahl der NC-Instanzen"
ansible.builtin.set_fact:
instances_number: "{{ nextcloud_instances | length }}"
2021-08-07 16:45:32 +02:00
- name: "Redis | Konfiguriere Anzahl der Datenbanken"
ansible.builtin.lineinfile:
2021-08-07 16:45:32 +02:00
path: "{{ redis_config_file }}"
regexp: '^databases 16$'
line: 'databases {{ instances_number }}'
2021-10-14 16:09:47 +02:00
when: instances_number|int <= 16