Overriding configuration options for unattended-upgrades











up vote
0
down vote

favorite












I have several Ubuntu servers which I want to have all upgrades applied automatically. I used to use a simple script which ran apt-get update && apt-get upgrade but that wasn't very robust, so I'm trying to migrate to unattended-upgrades instead, which seems to be the officially recommended way of doing this.



However, I'm struggling to achieve the following tasks:




  • How to get an email every day (assuming unattended-upgrades runs every day). At the moment I only seem to get emails when packages are upgraded (I prefer to get an email every day as that way I know if the email doesn't arrive, something has gone wrong).

  • How to upgrade all packages, not just those with security updates.


All the tutorials I can find, including the official Ubuntu documentation, tell me to edit the existing files in /etc/apt/apt.conf.d. However, I prefer to override options using additional files, partly so that I don't get a 'configuration file differs from maintainer' error later and also because this makes it easier to keep all the overrides in configuration management and version control.



Is it possible to override all the configuration options in this way? I've tried doing this and have found that some overrides seem to work whilst others don't.



My current overrides files is at /etc/apt/apt.conf.d/99zz-overrides (named to make sure it's read last) and contains the following:



Unattended-Upgrade::Mail "hello@example.org";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";


I haven't changed anything else in /etc/apt/apt.conf.d.










share|improve this question


























    up vote
    0
    down vote

    favorite












    I have several Ubuntu servers which I want to have all upgrades applied automatically. I used to use a simple script which ran apt-get update && apt-get upgrade but that wasn't very robust, so I'm trying to migrate to unattended-upgrades instead, which seems to be the officially recommended way of doing this.



    However, I'm struggling to achieve the following tasks:




    • How to get an email every day (assuming unattended-upgrades runs every day). At the moment I only seem to get emails when packages are upgraded (I prefer to get an email every day as that way I know if the email doesn't arrive, something has gone wrong).

    • How to upgrade all packages, not just those with security updates.


    All the tutorials I can find, including the official Ubuntu documentation, tell me to edit the existing files in /etc/apt/apt.conf.d. However, I prefer to override options using additional files, partly so that I don't get a 'configuration file differs from maintainer' error later and also because this makes it easier to keep all the overrides in configuration management and version control.



    Is it possible to override all the configuration options in this way? I've tried doing this and have found that some overrides seem to work whilst others don't.



    My current overrides files is at /etc/apt/apt.conf.d/99zz-overrides (named to make sure it's read last) and contains the following:



    Unattended-Upgrade::Mail "hello@example.org";
    APT::Periodic::Download-Upgradeable-Packages "1";
    APT::Periodic::Update-Package-Lists "1";
    APT::Periodic::Unattended-Upgrade "1";


    I haven't changed anything else in /etc/apt/apt.conf.d.










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have several Ubuntu servers which I want to have all upgrades applied automatically. I used to use a simple script which ran apt-get update && apt-get upgrade but that wasn't very robust, so I'm trying to migrate to unattended-upgrades instead, which seems to be the officially recommended way of doing this.



      However, I'm struggling to achieve the following tasks:




      • How to get an email every day (assuming unattended-upgrades runs every day). At the moment I only seem to get emails when packages are upgraded (I prefer to get an email every day as that way I know if the email doesn't arrive, something has gone wrong).

      • How to upgrade all packages, not just those with security updates.


      All the tutorials I can find, including the official Ubuntu documentation, tell me to edit the existing files in /etc/apt/apt.conf.d. However, I prefer to override options using additional files, partly so that I don't get a 'configuration file differs from maintainer' error later and also because this makes it easier to keep all the overrides in configuration management and version control.



      Is it possible to override all the configuration options in this way? I've tried doing this and have found that some overrides seem to work whilst others don't.



      My current overrides files is at /etc/apt/apt.conf.d/99zz-overrides (named to make sure it's read last) and contains the following:



      Unattended-Upgrade::Mail "hello@example.org";
      APT::Periodic::Download-Upgradeable-Packages "1";
      APT::Periodic::Update-Package-Lists "1";
      APT::Periodic::Unattended-Upgrade "1";


      I haven't changed anything else in /etc/apt/apt.conf.d.










      share|improve this question













      I have several Ubuntu servers which I want to have all upgrades applied automatically. I used to use a simple script which ran apt-get update && apt-get upgrade but that wasn't very robust, so I'm trying to migrate to unattended-upgrades instead, which seems to be the officially recommended way of doing this.



      However, I'm struggling to achieve the following tasks:




      • How to get an email every day (assuming unattended-upgrades runs every day). At the moment I only seem to get emails when packages are upgraded (I prefer to get an email every day as that way I know if the email doesn't arrive, something has gone wrong).

      • How to upgrade all packages, not just those with security updates.


      All the tutorials I can find, including the official Ubuntu documentation, tell me to edit the existing files in /etc/apt/apt.conf.d. However, I prefer to override options using additional files, partly so that I don't get a 'configuration file differs from maintainer' error later and also because this makes it easier to keep all the overrides in configuration management and version control.



      Is it possible to override all the configuration options in this way? I've tried doing this and have found that some overrides seem to work whilst others don't.



      My current overrides files is at /etc/apt/apt.conf.d/99zz-overrides (named to make sure it's read last) and contains the following:



      Unattended-Upgrade::Mail "hello@example.org";
      APT::Periodic::Download-Upgradeable-Packages "1";
      APT::Periodic::Update-Package-Lists "1";
      APT::Periodic::Unattended-Upgrade "1";


      I haven't changed anything else in /etc/apt/apt.conf.d.







      apt server unattended-upgrades






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 20 at 9:03









      pwaring

      1083




      1083



























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1094453%2foverriding-configuration-options-for-unattended-upgrades%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1094453%2foverriding-configuration-options-for-unattended-upgrades%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

          Eduardo VII do Reino Unido