2021-08-07 16:46:17 +02:00
|
|
|
---
|
2022-07-26 16:44:42 +02:00
|
|
|
- name: "configuration: {{ instance.name }}: trusted domains einrichten"
|
2021-08-07 16:46:17 +02:00
|
|
|
command: 'php {{ nextcloud_install_path }}/occ config:system:set trusted_domains {{ item.0 }} --value "{{ item.1 }}"'
|
|
|
|
become: true
|
|
|
|
become_user: "{{ instance.user }}"
|
|
|
|
changed_when: true
|
|
|
|
with_indexed_items:
|
2022-10-08 21:34:08 +02:00
|
|
|
- '{{ nextcloud.trusted_domains|default(instance.name) }}'
|
2021-08-07 16:46:17 +02:00
|
|
|
|
2022-07-26 16:44:42 +02:00
|
|
|
- name: "configuration: {{ instance.name }}: cron einrichten"
|
2021-08-07 16:46:17 +02:00
|
|
|
cron:
|
2022-07-26 16:44:42 +02:00
|
|
|
name: "nextcloud {{ instance.name }}"
|
2021-08-07 16:46:17 +02:00
|
|
|
minute: "*/5"
|
|
|
|
user: "{{ instance.user }}"
|
|
|
|
job: "php -f {{ nextcloud_install_path}}/cron.php"
|
|
|
|
cron_file: "nextcloud"
|
|
|
|
|
2022-07-26 16:44:42 +02:00
|
|
|
- name: "configuration: {{ instance.name }}: allgemeie Konfiguration"
|
2021-08-07 16:46:17 +02:00
|
|
|
command: "{{ item }}"
|
|
|
|
become: true
|
|
|
|
become_user: "{{ instance.user }}"
|
|
|
|
changed_when: true
|
|
|
|
with_items:
|
|
|
|
- '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"
|
2022-07-26 16:44:42 +02:00
|
|
|
- 'php {{ nextcloud_install_path }}/occ config:system:set overwrite.cli.url --value https://{{ instance.name }}'
|
2021-08-07 16:46:17 +02:00
|
|
|
- 'php {{ nextcloud_install_path }}/occ config:system:set htaccess.RewriteBase --value /'
|
|
|
|
- 'php {{ nextcloud_install_path }}/occ maintenance:update:htaccess'
|
|
|
|
- 'php {{ nextcloud_install_path }}/occ config:system:set default_language --value "de"'
|
|
|
|
- 'php {{ nextcloud_install_path }}/occ config:system:set default_phone_region --value "DE"'
|
|
|
|
- 'php {{ nextcloud_install_path }}/occ config:system:set loglevel --value "1"'
|
|
|
|
|
2022-07-26 16:44:42 +02:00
|
|
|
- name: "configuration: {{ instance.name }}: Mailversand einrichten"
|
2021-08-07 16:46:17 +02:00
|
|
|
blockinfile:
|
|
|
|
path: "{{ nextcloud_config_file }}"
|
|
|
|
insertbefore: '^\);'
|
|
|
|
marker_begin: mailserver
|
|
|
|
block: |2
|
2022-10-08 21:34:08 +02:00
|
|
|
'mail_from_address' => '{{ nextcloud.mail_from }}',
|
2021-08-07 16:46:17 +02:00
|
|
|
'mail_smtpmode' => 'smtp',
|
|
|
|
'mail_sendmailmode' => 'smtp',
|
2022-10-08 21:34:08 +02:00
|
|
|
'mail_domain' => '{{ nextcloud.mail_domain }}',
|
|
|
|
'mail_smtpauthtype' => '{{ nextcloud.smtp_auth_type }}',
|
|
|
|
'mail_smtphost' => '{{ nextcloud.smtp_host }}',
|
|
|
|
'mail_smtpport' => '{{ nextcloud.smtp_port}}',
|
2021-08-07 16:46:17 +02:00
|
|
|
|
2022-07-26 16:44:42 +02:00
|
|
|
- name: "configuration: {{ instance.name }}: Filelocking"
|
2021-08-07 16:46:17 +02:00
|
|
|
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,
|
|
|
|
'dbindex' => {{ instance_id }},
|
|
|
|
'timeout' => 1.5,
|
|
|
|
),
|
|
|
|
|
2022-07-26 16:44:42 +02:00
|
|
|
- name: "configuration: {{ instance.name }}: trusted proxies einrichten"
|
2021-08-07 16:46:17 +02:00
|
|
|
command: 'php {{ nextcloud_install_path }}/occ config:system:set trusted_proxies {{ item.0 }} --value "{{ item.1 }}"'
|
|
|
|
become: true
|
|
|
|
become_user: "{{ instance.user }}"
|
|
|
|
changed_when: true
|
|
|
|
with_indexed_items:
|
2022-10-08 21:34:08 +02:00
|
|
|
- "{{ nextcloud.trusted_proxies }}"
|