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
22 changes: 9 additions & 13 deletions roles/cron/cron_drupal7/tasks/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,15 @@
- 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: Set global MAILTO entry if it exists
ansible.builtin.cron:
name: MAILTO
env: true
job: "{{ drupal.cron_mailto }}"
user: "{{ deploy_user }}"
state: present
when: drupal.cron_mailto is defined
delegate_to: "{{ 'localhost' if drupal.defer else inventory_hostname }}"

- name: Setup Drupal cron tasks on app server.
ansible.builtin.cron:
Expand Down
21 changes: 8 additions & 13 deletions roles/cron/cron_drupal8/tasks/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,14 @@
- 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: Set global MAILTO entry if it exists
ansible.builtin.cron:
name: MAILTO
env: true
job: "{{ drupal.cron_mailto }}"
state: present
when: drupal.cron_mailto is defined
delegate_to: "{{ 'localhost' if drupal.defer else inventory_hostname }}"

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