From 6eb973c3af3a61234ed579e7f0f7b2adff3c9380 Mon Sep 17 00:00:00 2001 From: Marc Ransome Date: Tue, 10 Oct 2023 15:28:36 +0100 Subject: [PATCH] Disable cron job output emails --- roles/deploy/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/deploy/tasks/main.yml b/roles/deploy/tasks/main.yml index d78cefb..04c3cbf 100644 --- a/roles/deploy/tasks/main.yml +++ b/roles/deploy/tasks/main.yml @@ -81,6 +81,15 @@ job: "logrotate {{ tuxedo_log_rotation_config_path }}" cron_file: /etc/crontab +- name: Disable cron job output emails + cronvar: + name: MAILTO + value: "" + cron_file: "{{ item }}" + loop: + - /etc/crontab + - /etc/cron.d/clamav-update + - include_tasks: deploy.yml loop: "{{ tuxedo_service_users }}" loop_control: