jnv / ansible-role-unattended-upgrades

[DEPRECATED] Setup unattended-upgrades on Debian-based systems
https://github.com/jnv/ansible-role-unattended-upgrades/issues/98
GNU General Public License v2.0
272 stars 94 forks source link

Extend functionality to apt-listchanges #57

Closed dnmvisser closed 2 years ago

dnmvisser commented 5 years ago

If unattended_mail is set, the logs will be mailed. The default in Debian Stretch is to automagically install security updates, and in this case it would be nice to know what the changelog for these packages was. This is done with apt-listchanges, which is triggered by default from /etc/apt/apt.conf.d/20listchanges. By default the apt-listchanges configuration file/etc/apt/listchanges.conf` lists:

which=news

Which for unattended installs such as apt, does not send mail.

Hence it would be a nice idea to expand this role so that:

  1. the email_address in /etc/apt/listchanges.conf is also set to the value to unattended_mail.
  2. introduce a new config option (unattended_mail_listchanges that sets which=both.

This should probably be done with the ini module, as /etc/apt/listchanges.conf is an ini file.

I can contribute with a PR if there is interest

jnv commented 5 years ago

Thanks for the suggestion and the PR, Dick!

I am a bit wary of scope creep, because this goes beyond the configuration of unattended-upgrades as a sole responsibility of this role; apt-listchanges can be configured by a separate role. On the other hand, this seems to be recommended on Debian Wiki and it makes sense to configure these packages in tandem.

I will be happy to include this if:

I also wonder if the listchanges configuration can be written to different file rather than /etc/apt/listchanges.conf, I guess changing the default configuration file may cause conflicts during upgrade, as seen in #10.

jnv commented 2 years ago

I am closing this issue since this role has been deprecated. Feel free to suggest alternatives in #98.