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>
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