Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for supressing of cron email notifications #85

Open
Ramblurr opened this issue Nov 29, 2021 · 0 comments
Open

Allow for supressing of cron email notifications #85

Ramblurr opened this issue Nov 29, 2021 · 0 comments

Comments

@Ramblurr
Copy link
Contributor

I'm using this role to configure backup for hosts in a Proxmox cluster. Proxmox is debian based and includes postfix out of the box to send cron notifications.

I want to leave cron notifications enabled generally, but for the borgmatic job I want to disable them (as I have healthchecks alerting me to failed runs). The proper way to do this is to either append >/dev/null 2>&1 to the command so no output is generated, or pass --verbosity=-1 to borgmatic, or to define MAILTO="" in the crontab file.

The first and second is more portable, while the third might depend on the cron implementation.

Passing the --verbosity=-1 flag will supress output in the happy-path, but if there is an error it still produces output.

Personally, I'd rather no emails be sent and instead rely on healthchecks to notify me.

I propose borgmatic_cron_supress_output boolean variable to conditionally append the /dev/null redirect to the command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant