Commit 1babd838 authored by nimrod's avatar nimrod
Browse files

Add Cron job for background jobs, rename tasks for clearity.

parent 9d02daaf
Loading
Loading
Loading
Loading
+10 −2
Changes for tasks/main.yml: 10 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@
  changed_when: '"ownCloud was successfully installed" in owncloud_occ_install.stdout'
  failed_when: "owncloud_occ_install|failed and not 'Command \"maintenance:install\" is not defined' in owncloud_occ_install.stderr"

- name: Generate config json
- name: Generate configuration json
  template:
    src: config.json.j2
    dest: /var/www/owncloud/config.json
@@ -49,13 +49,21 @@
    group: www-data
    mode: '0644'

- name: Allow trusted domains (always changes)
- name: Import configuration (always changes)
  become: yes
  become_user: www-data
  command: /usr/bin/php occ config:import config.json
  args:
   chdir: /var/www/owncloud

- name: Add Cron job
  cron:
    name: ownCloud backgroup jobs executer
    user: www-data
    job: php -f /var/www/owncloud/cron.php | logger 2>&1
    state: present
    minute: '*/15'

- name: Enable mod-ssl in Apache
  with_items:
    - ssl