From: Anil Belur Date: Sun, 28 Oct 2018 09:40:45 +0000 (+1000) Subject: Disable apt-daily.* systemd services X-Git-Tag: v0.2.0~4 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=43484b0c2a6d0558cefbb91bfc6ad4be63b19ffa;p=releng%2Fcommon-packer.git Disable apt-daily.* systemd services 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 --- diff --git a/provision/baseline.yaml b/provision/baseline.yaml index cbfc28c..773952e 100644 --- a/provision/baseline.yaml +++ b/provision/baseline.yaml @@ -46,6 +46,11 @@ 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 @@ -60,6 +65,18 @@ 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