hannseman/ansible-raspbian

Unattended install templates quickly become non-idempotent

rmpratt1 opened this issue · 1 comments

I pulled in your role and wanted to provide a quick observation. When installing services (e.g. PiVPN) some will update the unattended install configuration for their own purposes. In this case the current execution of using a template will overwrite the updated configuration and there is no current way to override the unattended install "re-templating".

This occurs in unattended-upgrades.yml tasks:

  • "create apt auto-upgrades configuration"
  • "create apt unattended-upgrades configuration"

I'm not sure what the best behavior to emulate here is. Part of me leans towards lineinfile being the best option and specifically making sure desired elements exist and ignoring their specific configuration if they do.

Thanks for you report! Yes using lineinfile is probably the safest approach. I plan on upgrading this package to be fully buster compatible in the near future and I'll try and improve the unattended-upgrades tasks.