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
8 changes: 7 additions & 1 deletion roles/cron/cron_drupal7/tasks/job.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Define cron job command.
ansible.builtin.set_fact:
_cron_job_command: "cd {{ live_symlink_dest }}/{{ webroot }}/sites/{{ site.folder }} && {{ drupal.drush_location }} {{ entry.job }} >/dev/null"
_cron_job_command: "cd {{ live_symlink_dest }}/{{ webroot }}/sites/{{ site.folder }} && {{ drupal.drush_location }} {{ entry.job }}"

- name: Define cron job command if deferred (ASG).
ansible.builtin.set_fact:
Expand All @@ -12,6 +12,12 @@
- drupal.defer_target is defined
- drupal.defer_target | length > 0

- name: Add dev null redirection (for non-deferred).
ansible.builtin.set_fact:
_cron_job_command: "{{ _cron_job_command }} > /dev/null"
when:
- drupal.defer is not defined or not drupal.defer

- name: Define cron job command for differing deploy users.
ansible.builtin.set_fact:
_cron_job_command: "{{ _cron_job_command }} --extra-vars '{\"become\":true,\"become_user\":\"{{ www_user }}\"}'"
Expand Down
8 changes: 7 additions & 1 deletion roles/cron/cron_drupal8/tasks/job.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Define cron job command.
ansible.builtin.set_fact:
_cron_job_command: "cd {{ live_symlink_dest }}/{{ webroot }}/sites/{{ site.folder }} && {{ drupal.drush_location }} {{ entry.job }} >/dev/null"
_cron_job_command: "cd {{ live_symlink_dest }}/{{ webroot }}/sites/{{ site.folder }} && {{ drupal.drush_location }} {{ entry.job }}"

- name: Define cron job command if deferred (ASG).
ansible.builtin.set_fact:
Expand All @@ -12,6 +12,12 @@
- drupal.defer_target is defined
- drupal.defer_target | length > 0

- name: Add dev null redirection (for non-deferred).
ansible.builtin.set_fact:
_cron_job_command: "{{ _cron_job_command }} > /dev/null"
when:
- drupal.defer is not defined or not drupal.defer

- name: Define cron job command for differing deploy users.
ansible.builtin.set_fact:
_cron_job_command: "{{ _cron_job_command }} --extra-vars '{\"become\":true,\"become_user\":\"{{ www_user }}\"}'"
Expand Down