---
- name: setup apt auto upgrade timers
  template:
    src: "{{ item }}.timer"
    dest: "/lib/systemd/system/{{ item }}.timer"
    owner: root
    group: root
    mode: 0644
  with_items: "{{ apt_auto_delay_services }}"

- name: disable apt auto upgrade service
  systemd:
    name: "{{ item }}.service"
    enabled: no
  with_items: "{{ apt_auto_delay_services }}"

- name: enable apt auto upgrade timers
  systemd:
    name: "{{ item }}.timer"
    state: started
    enabled: yes
  with_items: "{{ apt_auto_delay_services }}"

