Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions roles/cron/cron_drupal7/tasks/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

- name: Define cron job command if deferred (ASG).
ansible.builtin.set_fact:
_cron_job_command: "cd {{ _ce_deploy_base_dir }} && {{ _ce_deploy_ansible_location }} {{ drupal.defer_target }} -m shell -a \"{{ _cron_job_command }}\" > /dev/null"
_cron_job_command: >-
cd {{ _ce_deploy_base_dir }} && {{ _ce_deploy_ansible_location }} {{ drupal.defer_target }} -m shell -a "{{ _cron_job_command }} > /dev/null{% if entry.cron_error_mailto is defined %} 2>&1 | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}{% endif %}"
when:
- drupal.defer is defined
- drupal.defer
Expand All @@ -14,7 +15,8 @@

- name: Add dev null redirection (for non-deferred).
ansible.builtin.set_fact:
_cron_job_command: "{{ _cron_job_command }} > /dev/null"
_cron_job_command: >-
{{ _cron_job_command }} > /dev/null{% if entry.cron_error_mailto is defined %} 2>&1 | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}{% endif %}
when:
- drupal.defer is not defined or not drupal.defer

Expand Down
6 changes: 4 additions & 2 deletions roles/cron/cron_drupal8/tasks/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

- name: Define cron job command if deferred (ASG).
ansible.builtin.set_fact:
_cron_job_command: "cd {{ _ce_deploy_base_dir }} && {{ _ce_deploy_ansible_location }} {{ drupal.defer_target }} -m shell -a \"{{ _cron_job_command }}\" > /dev/null"
_cron_job_command: >-
cd {{ _ce_deploy_base_dir }} && {{ _ce_deploy_ansible_location }} {{ drupal.defer_target }} -m shell -a "{{ _cron_job_command }} > /dev/null{% if entry.cron_error_mailto is defined %} 2>&1 | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}{% endif %}"
when:
- drupal.defer is defined
- drupal.defer
Expand All @@ -14,7 +15,8 @@

- name: Add dev null redirection (for non-deferred).
ansible.builtin.set_fact:
_cron_job_command: "{{ _cron_job_command }} > /dev/null"
_cron_job_command: >-
{{ _cron_job_command }} > /dev/null{% if entry.cron_error_mailto is defined %} 2>&1 | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}{% endif %}
when:
- drupal.defer is not defined or not drupal.defer

Expand Down