---

- name: Install unattended upgrades
  apt:
    name:
    - unattended-upgrades
    - debian-goodies

- name: Configure unattended upgrades
  template: src={{ item }}.j2 dest=/etc/apt/apt.conf.d/{{ item }}
  with_items:
  - 02periodic
  - 50unattended-upgrades