diff --git a/tasks/main.yml b/tasks/main.yml index a53f756..ed11cf0 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -113,6 +113,16 @@ name: "nextcloud cron job" # not required. Description of a crontab entry or, if env is set, the name of environment variable. Required if state=absent. Note that if name is not set and state=present, then a new crontab entry will always be created, regardless of existing ones. become: yes +- name: create cron for file scan + cron: + job: "sudo -u http /usr/bin/php /usr/share/webapps/nextcloud/occ files:scan --all > /dev/null" + user: root # not required. The specific user whose crontab should be modified. + minute: "00" # not required. Minute when the job should run ( 0-59, *, */2, etc ) + hour: "4" + name: "nextcloud cron job" # not required. Description of a crontab entry or, if env is set, the name of environment variable. Required if state=absent. Note that if name is not set and state=present, then a new crontab entry will always be created, regardless of existing ones. + become: yes + + - name: Install fail2ban jail template: src: fail2ban/nextcloud.local.j2