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
7 changes: 7 additions & 0 deletions roles/cron/cron_drupal7/tasks/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,19 @@
- drupal.defer is defined
- drupal.defer

- name: Remove existing MAILTO entry (if any)
community.general.cronvar:
name: MAILTO
state: absent
delegate_to: "{{ 'localhost' if drupal.defer else inventory_hostname }}"

- name: Set global MAILTO for cron jobs (if defined)
community.general.cronvar:
name: MAILTO
value: "{{ drupal.cron_mailto | default(omit) }}"
state: present
when: drupal.cron_mailto is defined and drupal.cron_mailto | length > 0
delegate_to: "{{ 'localhost' if drupal.defer else inventory_hostname }}"

- name: Setup Drupal cron tasks on app server.
ansible.builtin.cron:
Expand Down
7 changes: 7 additions & 0 deletions roles/cron/cron_drupal8/tasks/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,19 @@
- drupal.defer is defined
- drupal.defer

- name: Remove existing MAILTO entry (if any)
community.general.cronvar:
name: MAILTO
state: absent
delegate_to: "{{ 'localhost' if drupal.defer else inventory_hostname }}"

- name: Set global MAILTO for cron jobs (if defined)
community.general.cronvar:
name: MAILTO
value: "{{ drupal.cron_mailto | default(omit) }}"
state: present
when: drupal.cron_mailto is defined and drupal.cron_mailto | length > 0
delegate_to: "{{ 'localhost' if drupal.defer else inventory_hostname }}"

- name: Setup Drupal cron tasks on app server.
ansible.builtin.cron:
Expand Down