diff --git a/roles/cron/cron_drupal7/defaults/main.yml b/roles/cron/cron_drupal7/defaults/main.yml index d7017099..5b2fcc7d 100644 --- a/roles/cron/cron_drupal7/defaults/main.yml +++ b/roles/cron/cron_drupal7/defaults/main.yml @@ -19,6 +19,6 @@ drupal: # 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] defer_target: "" drush_location: "{{ drush_bin }}" # you might specify another location, e.g. "{{ deploy_path }}/vendor/bin/drush" - cron_error_filter: "> /tmp/cron_output.txt 2>&1; rc=\\$?; 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 fi" - cron_error_email: "{% if item.cron_error_mailto is defined and item.cron_error_mailto|length > 0 %}mail -s 'Cron Error - $(hostname)' {{ item.cron_error_mailto }} < /tmp/cron_output.txt;{% endif %}" + cron_error_filter: "> /tmp/cron_output.txt 2>&1; rc=\\$?; 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" + cron_error_email: "{% if item.cron_error_mailto is defined and item.cron_error_mailto|length > 0 %}mail -s 'Cron Error - $(hostname)' {{ item.cron_error_mailto }} < /tmp/cron_output.txt;{% endif %} fi" python_interpreter: "-e 'ansible_python_interpreter=/home/controller/ce-python/bin/python'" diff --git a/roles/cron/cron_drupal8/defaults/main.yml b/roles/cron/cron_drupal8/defaults/main.yml index 2afaa893..94aad065 100644 --- a/roles/cron/cron_drupal8/defaults/main.yml +++ b/roles/cron/cron_drupal8/defaults/main.yml @@ -22,6 +22,6 @@ drupal: # 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] defer_target: "" drush_location: "{{ drush_bin }}" # you might specify another location, e.g. "{{ deploy_path }}/vendor/bin/drush" - cron_error_filter: "> /tmp/cron_output.txt 2>&1; rc=\\$?; 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 fi" - cron_error_email: "{% if item.cron_error_mailto is defined and item.cron_error_mailto|length > 0 %}mail -s 'Cron Error - $(hostname)' {{ item.cron_error_mailto }} < /tmp/cron_output.txt;{% endif %}" - python_interpreter: "-e 'ansible_python_interpreter=/home/controller/ce-python/bin/python'" + cron_error_filter: "> /tmp/cron_output.txt 2>&1; rc=\\$?; 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" + cron_error_email: "{% if item.cron_error_mailto is defined and item.cron_error_mailto|length > 0 %}mail -s 'Cron Error - $(hostname)' {{ item.cron_error_mailto }} < /tmp/cron_output.txt;{% endif %} fi" + python_interpreter: "-e 'ansible_python_interpreter=/home/controller/ce-python/bin/python'" \ No newline at end of file