Redis-Tasks
This commit is contained in:
parent
78307df9e0
commit
c53b9af64e
6 changed files with 42 additions and 8 deletions
|
@ -5,5 +5,6 @@
|
|||
tags: database
|
||||
- import_tasks: php.yml
|
||||
- import_tasks: apache.yml
|
||||
- import_tasks: redis.yml
|
||||
- import_tasks: nextcloud.yml
|
||||
tags: nextcloud
|
||||
|
|
|
@ -52,9 +52,11 @@
|
|||
- "php {{ nextcloud_install_path }}/occ app:enable encryption"
|
||||
- "php {{ nextcloud_install_path }}/occ encryption:enable"
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set memcache.local --value "\\OC\\Memcache\\APCu"'
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set memcache.distributed --value "\OC\Memcache\Redis"'
|
||||
- "php {{ nextcloud_install_path }}/occ background:cron"
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set overwrite.cli.url --value https://{{ nextcloud_domain }}'
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set htaccess.RewriteBase --value /'
|
||||
- 'php {{ nextcloud_install_path }}/occ maintenance:update:htaccess'
|
||||
|
||||
- name: "NC Mailversand einrichten"
|
||||
blockinfile:
|
||||
|
@ -70,10 +72,24 @@
|
|||
'mail_smtphost' => '{{ nextcloud_smtp_host }}',
|
||||
'mail_smtpport' => '{{ nextcloud_smtp_port}}',
|
||||
|
||||
- name: "NC trusted proxies eirichten"
|
||||
- name: "NC Filelocking"
|
||||
blockinfile:
|
||||
path: "{{ nextcloud_config_file }}"
|
||||
insertbefore: '^\);'
|
||||
marker_begin: filelocking
|
||||
block: |2
|
||||
'filelocking.enabled' => true,
|
||||
'memcache.locking' => '\OC\Memcache\Redis',
|
||||
'redis' => array(
|
||||
'host' => '/var/run/redis/redis-server.sock',
|
||||
'port' => 0,
|
||||
'timeout' => 0.0,
|
||||
),
|
||||
|
||||
- name: "NC trusted proxies einrichten"
|
||||
command: 'php {{ nextcloud_install_path }}/occ config:system:set trusted_proxies {{ item.0 }} --value "{{ item.1 }}"'
|
||||
become: true
|
||||
become_user: "{{ common_name }}"
|
||||
changed_when: true
|
||||
with_indexed_items:
|
||||
- '{{ nextcloud_trusted_proxies }}'
|
||||
- '{{ nextcloud_trusted_proxies }}'
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
name: "{{ common_name }}"
|
||||
create_home: no
|
||||
password: "!"
|
||||
groups: "{{ common_name }},redis"
|
||||
shell: /bin/false
|
||||
state: present
|
||||
|
||||
|
|
13
tasks/redis.yml
Normal file
13
tasks/redis.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
|
||||
- name: "Redis Aktiviere Socket"
|
||||
lineinfile:
|
||||
path: /etc/redis/redis.conf
|
||||
regexp: '^# unixsocket /var/run/redis/redis-server.sock'
|
||||
line: 'unixsocket /var/run/redis/redis-server.sock'
|
||||
|
||||
- name: "Redis Berechtigungen"
|
||||
lineinfile:
|
||||
path: /etc/redis/redis.conf
|
||||
regexp: '^# unixsocketperm 700'
|
||||
line: 'unixsocketperm 770'
|
Loading…
Add table
Add a link
Reference in a new issue