--- - name: configure email when: use_sendmail and installation.changed block: - name: mail_domain command: chdir: ~/html cmd: php occ config:system:set mail_domain --value="uber.space" - name: mail_from_address command: chdir: ~/html cmd: php occ config:system:set mail_from_address --value="{{ uberspace_user }}" - name: smtp_mode command: chdir: ~/html cmd: php occ config:system:set mail_smtpmode --value="sendmail" - name: sendmail_mode command: chdir: ~/html cmd: php occ config:system:set mail_sendmailmode --value="pipe" - name: initialize URL rewriting when: installation.changed block: - name: rewrite base command: chdir: ~/html cmd: php occ config:system:set htaccess.RewriteBase --value='/' - name: update htaccess command: chdir: ~/html cmd: php occ maintenance:update:htaccess - name: initialize cronjob when: installation.changed block: - name: update crontab cron: name: nextcloud-cron state: present job: php -f $HOME/html/cron.php > $HOME/logs/nextcloud-cron.log 2>&1 minute: "*/5" - name: use cronjob for background command: chdir: ~/html cmd: php occ background:cron - name: set up redis when: installation.changed block: - name: set redis host command: chdir: ~/html cmd: php occ config:system:set redis host --value="/home/{{ uberspace_user }}/.redis/sock" - name: set redis port command: chdir: ~/html cmd: php occ config:system:set redis port --value=0 - name: set redis timeout command: chdir: ~/html cmd: php occ config:system:set redis timeout --value=1.5 - name: enable file locking command: chdir: ~/html cmd: php occ config:system:set filelocking.enabled --value='true' - name: use Redis for memcache.locking command: chdir: ~/html cmd: php occ config:system:set memcache.locking --value='\OC\Memcache\Redis' - name: use Redis for memcache.distributed command: chdir: ~/html cmd: php occ config:system:set memcache.distributed --value='\OC\Memcache\Redis' - name: set default phone region when: installation.changed command: chdir: ~/html cmd: php occ config:system:set default_phone_region --value='{{ phone_region }}' - name: perform database maintenance when: installation.changed block: - name: add missing indices command: chdir: ~/html cmd: php occ db:add-missing-indices --no-interaction - name: add missing columns command: chdir: ~/html cmd: php occ db:add-missing-columns --no-interaction - name: add missing primary keys command: chdir: ~/html cmd: php occ db:add-missing-primary-keys --no-interaction - name: convert filecache bigint command: chdir: ~/html cmd: php occ db:convert-filecache-bigint --no-interaction