Disable apt-daily.* systemd services 18/13218/2
authorAnil Belur <abelur@linuxfoundation.org>
Sun, 28 Oct 2018 09:40:45 +0000 (19:40 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Thu, 1 Nov 2018 20:51:57 +0000 (06:51 +1000)
Disable apt-daily.* systemd services that call unattended-upgrades.
Also disable the default configuration for periodic updates.

JIRA: RELENG-1037
Change-Id: Ic9e5e0f8a1543e0d978c0f8528c1a30646a71370
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
provision/baseline.yaml

index cbfc28c..773952e 100644 (file)
             path: /etc/apt/apt.conf.d/10periodic
             regexp: '1'
             replace: '0'
+        - name: Set all auto update options to 0
+          replace:
+            path: /etc/apt/apt.conf.d/20auto-upgrades
+            regexp: '1'
+            replace: '0'
         - name: Disable unattended upgrades
           lineinfile:
             path: /etc/apt/apt.conf.d/10periodic
           dpkg_selections:
             name: unattended-upgrades
             selection: hold
+        - name: Disable apt-daily.* systemd services
+          systemd:
+            name: '{{service}}'
+            enabled: no
+            masked: yes
+          with_items:
+            - apt-daily.service
+            - apt-daily.timer
+            - apt-daily-upgrade.service
+            - apt-daily-upgrade.timer
+          loop_control:
+            loop_var: service
       when: ansible_distribution == 'Ubuntu'
       become: yes