Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit 7982749

Browse files
drazenCEgregharveyfiliprupicfiliptymofiisobchenko
authored
Fixing cron syntax pr devel 1.x (#743)
* Php unix socket pr 1.x (#724) * Moving cachetool adapter setup to the installer role and adding a test. * Updating cachetool documentation. * Php unix socket pr 1.x (#726) * Moving cachetool adapter setup to the installer role and adding a test. * Updating cachetool documentation. * Making sure _cachetool_adapter is always set. * Optional-drush-cr-before-import (#728) * 73171 fixing cachetool checks fpm pr 1.x (#729) * skipping cachetool check when no fpm * remove empty line --------- Co-authored-by: filip <filip.rupic@codeenigma.com> * asg_management_fix_and_improve (#733) * asg_management_fix_and_improve * asg_management_fix_and_improve * asg_management_fix_and_improve * asg_management_fix_and_improve * asg_management_fix_and_improve * Adding-delay-opcache-status-check (#737) * Adding-delay-opcache-status-check * Removing-failed-when * fix_var_name_for_asg_management (#739) * Fixing-cron-syntax * Fixing-cron-syntax-PR-devel-1.x * Fixing-cron-syntax-PR-devel-1.x --------- Co-authored-by: Greg Harvey <greg.harvey@gmail.com> Co-authored-by: Filip Rupic <123341158+filiprupic@users.noreply.github.com> Co-authored-by: filip <filip.rupic@codeenigma.com> Co-authored-by: tymofiisobchenko <104431720+tymofiisobchenko@users.noreply.github.com>
1 parent fae9347 commit 7982749

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

roles/cron/cron_drupal7/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ drupal:
1919
# If defer is set to true, the Ansible target must be declared with defer_target. If using a group, include the index. For example, _ce_www_dev[0]
2020
defer_target: ""
2121
drush_location: "{{ drush_bin }}" # you might specify another location, e.g. "{{ deploy_path }}/vendor/bin/drush"
22-
cron_error_filter: "> /tmp/cron_output.txt 2>&1; rc=$?; if [ $rc -ne 0 ]; then mail -s \"Cron Error - $(hostname)\" sysadm@codeenigma.com < /tmp/cron_output.txt; elif grep -iE \"(error|fail|fatal|critical|exception)\" /tmp/cron_output.txt | grep -v -E '(\"rc\": -13|MODULE FAILURE)' | grep -q .; then mail -s \"Cron Error - $(hostname)\" sysadm@codeenigma.com < /tmp/cron_output.txt; fi"
23-
cron_error_email: "{% if entry.cron_error_mailto is defined %}; if [ $rc -ne 0 ] || grep -iE \"(error|fail|fatal|critical|exception)\" /tmp/cron_output.txt | grep -v -E '(\"rc\": -13|MODULE FAILURE)' | grep -q .; then echo 'Command failed' | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}; fi{% endif %}"
22+
cron_error_filter: "> /tmp/cron_output.txt 2>&1; rc=$?; if [ $rc -ne 0 ]; then mail -s \"Cron Error - $(hostname)\" sysadm@codeenigma.com < /tmp/cron_output.txt; elif grep -iE \"error|fail|fatal|critical|exception\" /tmp/cron_output.txt | grep -v -E '(\"rc\": -13|MODULE FAILURE)' | grep -q .; then mail -s \"Cron Error - $(hostname)\" sysadm@codeenigma.com < /tmp/cron_output.txt; fi"
23+
cron_error_email: "{% if entry.cron_error_mailto is defined %}if [ $rc -ne 0 ] || grep -iE \"error|fail|fatal|critical|exception\" /tmp/cron_output.txt | grep -v -E '(\"rc\": -13|MODULE FAILURE)' | grep -q .; then echo 'Command failed' | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}; fi{% endif %}"
2424
python_interpreter: "-e 'ansible_python_interpreter=/home/controller/ce-python/bin/python'"

roles/cron/cron_drupal8/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ drupal:
2222
# If defer is set to true, the Ansible target must be declared with defer_target. If using a group, include the index. For example, _ce_www_dev[0]
2323
defer_target: ""
2424
drush_location: "{{ drush_bin }}" # you might specify another location, e.g. "{{ deploy_path }}/vendor/bin/drush"
25-
cron_error_filter: "> /tmp/cron_output.txt 2>&1; rc=$?; if [ $rc -ne 0 ]; then mail -s \"Cron Error - $(hostname)\" sysadm@codeenigma.com < /tmp/cron_output.txt; elif grep -iE \"(error|fail|fatal|critical|exception)\" /tmp/cron_output.txt | grep -v -E '(\"rc\": -13|MODULE FAILURE)' | grep -q .; then mail -s \"Cron Error - $(hostname)\" sysadm@codeenigma.com < /tmp/cron_output.txt; fi"
26-
cron_error_email: "{% if entry.cron_error_mailto is defined %}; if [ $rc -ne 0 ] || grep -iE \"(error|fail|fatal|critical|exception)\" /tmp/cron_output.txt | grep -v -E '(\"rc\": -13|MODULE FAILURE)' | grep -q .; then echo 'Command failed' | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}; fi{% endif %}"
25+
cron_error_filter: "> /tmp/cron_output.txt 2>&1; rc=$?; if [ $rc -ne 0 ]; then mail -s \"Cron Error - $(hostname)\" sysadm@codeenigma.com < /tmp/cron_output.txt; elif grep -iE \"error|fail|fatal|critical|exception\" /tmp/cron_output.txt | grep -v -E '(\"rc\": -13|MODULE FAILURE)' | grep -q .; then mail -s \"Cron Error - $(hostname)\" sysadm@codeenigma.com < /tmp/cron_output.txt; fi"
26+
cron_error_email: "{% if entry.cron_error_mailto is defined %}if [ $rc -ne 0 ] || grep -iE \"error|fail|fatal|critical|exception\" /tmp/cron_output.txt | grep -v -E '(\"rc\": -13|MODULE FAILURE)' | grep -q .; then echo 'Command failed' | mail -s 'Cron Error - {{ inventory_hostname }}' {{ entry.cron_error_mailto }}; fi{% endif %}"
2727
python_interpreter: "-e 'ansible_python_interpreter=/home/controller/ce-python/bin/python'"

0 commit comments

Comments
 (0)