diff --git a/roles/cron/cron_drupal8/defaults/main.yml b/roles/cron/cron_drupal8/defaults/main.yml index 636557ca..f0674208 100644 --- a/roles/cron/cron_drupal8/defaults/main.yml +++ b/roles/cron/cron_drupal8/defaults/main.yml @@ -13,6 +13,7 @@ drupal: job: cron # disabled: true # mailto: "{{ drupal.cron_mailto | default('') }}" # Each cron can have it's own mailto and can be configured to use different e-mail addresses. + # file: "/etc/cron.d/{{ project_name }}_{{ site.folder }}_{{ build_type }}_{{ entry.job }}" # uncomment to create a file for cron - note, deploy user needs to be able to write to the location cron_mailto: "" # If the sites are being deployed to an ASG, setting defer to true will create the crontab entry on the deploy server rather than all of the app servers. defer: false diff --git a/roles/cron/cron_drupal8/tasks/job.yml b/roles/cron/cron_drupal8/tasks/job.yml index 23c7bd5b..ed801a90 100644 --- a/roles/cron/cron_drupal8/tasks/job.yml +++ b/roles/cron/cron_drupal8/tasks/job.yml @@ -43,4 +43,6 @@ {{ _cron_job_command | trim }} state: present disabled: "{{ entry.disabled | default(omit) }}" + cron_file: "{{ entry.file | default(omit) }}" + user: "{{ www_user }}" delegate_to: "{{ 'localhost' if drupal.defer else inventory_hostname }}"