puppetlabs / puppetlabs-apt

Puppet module to help manage Apt
https://forge.puppetlabs.com/puppetlabs/apt
Apache License 2.0
215 stars 463 forks source link

(maint) Set DEBIAN_FRONTEND=noninteractive on upgrade #999

Closed smortex closed 2 years ago

smortex commented 3 years ago

When upgrading Debian packages, the system sometimes what to prompt the user about what action to perform. Since a tasks is supposed to be non-interactive, we should disable such prompts.

This help when updating some packages, e.g. postfix.

smortex commented 3 years ago

I also think that we should explicitly add -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" to the command line (they are set on my systems in /etc/apt/apt.conf.d but we can't really count on that).

Though?

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

daianamezdrea commented 3 years ago

Hi @smortex, the PR looks good and I'm planning to merge it, regarding your second comment, this should be solved by the "--force-yes" option

smortex commented 3 years ago

Hi @daianamezdrea. I just discussed the topic with a friend: --force-yes seems to be deprecated: it is not documented in recent versions of dpkg(1). He confirmed --force-confdef and --force-confold are the way to go:

daianamezdrea commented 2 years ago

Hello @smortex, I did a research also and I think you're right

daianamezdrea commented 2 years ago

Thank you for this PR and your contributions !