sous-chefs / apt

Development repository for the apt cookbook
https://supermarket.chef.io/cookbooks/apt
Apache License 2.0
202 stars 266 forks source link

Allow to customize sender email for unattended-upgrades #240

Closed infertux closed 5 years ago

infertux commented 5 years ago

Description

This allows to customize the sender address used in emails sent by unattended-upgrades.

Issues Resolved

Override the default root sender:

$ grep "Unattended-Upgrade::Sender" /usr/bin/unattended-upgrade
    from_email = apt_pkg.config.find("Unattended-Upgrade::Sender", "root")

Check List

Not applicable (see below).

The tests for unattended-upgrades are currently commented out in spec/unit/recipes/unattended-upgrades_spec.rb. This change is fairly straightforward as it's very similar to the existing node['apt']['unattended_upgrades']['mail'] attribute.

infertux commented 5 years ago

Good catch @tas50. I wrapped the other comments as well while I was at it.

infertux commented 5 years ago

Awesome, thanks for pushing a new release to the supermarket @tas50 :)