Description
Unattended upgrades are scheduled only once, due to an empty "OnCalendar" line in timer definition.
To reproduce
Deploy the role so that apt-daily is triggered in a couple of minutes:
- name: Testing
hosts: all
become: yes
become_method: ansible.builtin.sudo
tasks:
- name: Debian - unattended upgrades
ansible.builtin.import_role:
name: hifis.toolkit.unattended_upgrades
vars:
unattended_systemd_timer_override: true
unattended_apt_daily_oncalendar: "*-*-* 13:52"
unattended_apt_daily_randomizeddelaysec: "1m"
Connect to the host and list timers to check the schedule date.
Current behavior
Timers is scheduled once:
# systemctl list-timers
NEXT LEFT LAST PASSED UNIT ACTIVATES
Fri 2025-05-23 13:52:34 CEST 1min 17s left Fri 2025-05-23 11:48:01 CEST 2h 3min ago apt-daily.timer apt-daily.service
After timers passed, it is not scheduled again:
:~# systemctl list-timers
NEXT LEFT LAST PASSED UNIT ACTIVATES
- - Fri 2025-05-23 13:52:34 CEST 37s ago apt-daily.timer apt-daily.service
Expected behavior
Timers is scheduled again after its first run.
OS / Environment
Debian 12
Ansible version
ansible [core 2.18.6]
config file = /home/mjourdan/git/ansible/ansible.cfg
configured module search path = ['/home/mjourdan/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/mjourdan/.ansible_virtualenvs/ansible-11.6.0/lib/python3.11/site-packages/ansible
ansible collection location = /home/mjourdan/.ansible/collections:/usr/share/ansible/collections
executable location = /home/mjourdan/.ansible_virtualenvs/ansible-11.6.0/bin/ansible
python version = 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0] (/home/mjourdan/.ansible_virtualenvs/ansible-11.6.0/bin/python3)
jinja version = 3.1.6
libyaml = True
Collection version
v5.3.0
Additional context
Please feel free to add any other context about the problem here.
Description
Unattended upgrades are scheduled only once, due to an empty "OnCalendar" line in timer definition.
To reproduce
Deploy the role so that apt-daily is triggered in a couple of minutes:
Connect to the host and list timers to check the schedule date.
Current behavior
Timers is scheduled once:
After timers passed, it is not scheduled again:
Expected behavior
Timers is scheduled again after its first run.
OS / Environment
Debian 12
Ansible version
Collection version
v5.3.0
Additional context
Please feel free to add any other context about the problem here.