diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2024-01-04 12:59:39 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2024-01-04 13:42:18 +0100 |
commit | 6691410f945719e62601c3d69d9b2ff9c4cfb4fb (patch) | |
tree | 9ea4170a6d5d50ac14a326f42fa8b13303734241 /tasks/apt.yml | |
parent | 609574f51c5c08af71419bddc1be16ad5668882a (diff) |
Base system.
Diffstat (limited to 'tasks/apt.yml')
-rw-r--r-- | tasks/apt.yml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tasks/apt.yml b/tasks/apt.yml new file mode 100644 index 0000000..1023908 --- /dev/null +++ b/tasks/apt.yml @@ -0,0 +1,46 @@ +- 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 |