50unattended-upgrades.j2 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // Unattended-Upgrade::Origins-Pattern controls which packages are
  2. // upgraded.
  3. //
  4. // Lines below have the format format is "keyword=value,...". A
  5. // package will be upgraded only if the values in its metadata match
  6. // all the supplied keywords in a line. (In other words, omitted
  7. // keywords are wild cards.) The keywords originate from the Release
  8. // file, but several aliases are accepted. The accepted keywords are:
  9. // a,archive,suite (eg, "stable")
  10. // c,component (eg, "main", "crontrib", "non-free")
  11. // l,label (eg, "Debian", "Debian-Security")
  12. // o,origin (eg, "Debian", "Unofficial Multimedia Packages")
  13. // n,codename (eg, "jessie", "jessie-updates")
  14. // site (eg, "http.debian.net")
  15. // The available values on the system are printed by the command
  16. // "apt-cache policy", and can be debugged by running
  17. // "unattended-upgrades -d" and looking at the log file.
  18. //
  19. // Within lines unattended-upgrades allows 2 macros whose values are
  20. // derived from /etc/debian_version:
  21. // ${distro_id} Installed origin.
  22. // ${distro_codename} Installed codename (eg, "jessie")
  23. Unattended-Upgrade::Origins-Pattern {
  24. // Archive or Suite based matching:
  25. // Note that this will silently match a different release after
  26. // migration to the specified archive (e.g. testing becomes the
  27. // new stable).
  28. "o=Debian,n=${distro_codename}";\n'
  29. "o=Debian,n=${distro_codename},a=stable-updates";
  30. "o=Debian,n=${distro_codename},a=proposed-updates";
  31. "o=Debian,n=${distro_codename},l=Debian-Security";\n'
  32. "o=Debian Backports,n=${distro_codename}-backports,l=Debian Backports";\n'
  33. "origin=Debian,archive=stable,label=Debian-Security";
  34. "origin=Debian,archive=oldstable,label=Debian-Security";
  35. };
  36. // List of packages to not update (regexp are supported)
  37. Unattended-Upgrade::Package-Blacklist {
  38. // "vim";
  39. // "libc6";
  40. // "libc6-dev";
  41. // "libc6-i686";
  42. };
  43. // This option allows you to control if on a unclean dpkg exit
  44. // unattended-upgrades will automatically run
  45. // dpkg --force-confold --configure -a
  46. // The default is true, to ensure updates keep getting installed
  47. //Unattended-Upgrade::AutoFixInterruptedDpkg "false";
  48. // Split the upgrade into the smallest possible chunks so that
  49. // they can be interrupted with SIGUSR1. This makes the upgrade
  50. // a bit slower but it has the benefit that shutdown while a upgrade
  51. // is running is possible (with a small delay)
  52. Unattended-Upgrade::MinimalSteps "true";
  53. // Install all unattended-upgrades when the machine is shuting down
  54. // instead of doing it in the background while the machine is running
  55. // This will (obviously) make shutdown slower
  56. Unattended-Upgrade::InstallOnShutdown "true";
  57. // Send email to this address for problems or packages upgrades
  58. // If empty or unset then no email is sent, make sure that you
  59. // have a working mail setup on your system. A package that provides
  60. // 'mailx' must be installed. E.g. "user@example.com"
  61. //Unattended-Upgrade::Mail "root";
  62. // Set this value to "true" to get emails only on errors. Default
  63. // is to always send a mail if Unattended-Upgrade::Mail is set
  64. //Unattended-Upgrade::MailOnlyOnError "true";
  65. // Do automatic removal of new unused dependencies after the upgrade
  66. // (equivalent to apt-get autoremove)
  67. //Unattended-Upgrade::Remove-Unused-Dependencies "false";
  68. // Automatically reboot *WITHOUT CONFIRMATION* if
  69. // the file /var/run/reboot-required is found after the upgrade
  70. // Unattended-Upgrade::Automatic-Reboot "false";
  71. // If automatic reboot is enabled and needed, reboot at the specific
  72. // time instead of immediately
  73. // Default: "now"
  74. // Unattended-Upgrade::Automatic-Reboot-Time "03:00";
  75. // Use apt bandwidth limit feature, this example limits the download
  76. // speed to 70kb/sec
  77. //Acquire::http::Dl-Limit "70";