- name: Install various APT tools (1) apt: pkg={{ packages }} vars: packages: - apt - lsb-release - name: Remove /etc/apt/sources.list file: path=/etc/apt/sources.list state=absent notify: - apt-get update - name: Remove /etc/apt/sources.list.d/hetzner-* file: path={{ item }} state=absent with_fileglob: /etc/apt/sources.list.d/hetzner-* notify: - apt-get update - name: Copy /etc/apt/sources.list.d/debian.sources template: src=etc/apt/sources.list.d/debian.sources.j2 dest=/etc/apt/sources.list.d/debian.sources owner=root group=root mode=0644 notify: - apt-get update - name: Remove /etc/apt/apt.conf.d/*hetzner file: path={{ item }} state=absent with_fileglob: /etc/apt/apt.conf.d/*hetzner # We should run 'apt-get update' before proceeding to any other task. - meta: flush_handlers - name: Install various APT tools (2) apt: pkg={{ packages }} vars: packages: - apt-listchanges - needrestart - unattended-upgrades - name: Configure apt-listchanges copy: src=etc/apt/listchanges.conf dest=/etc/apt/listchanges.conf owner=root group=root mode=0644