blob: f17a2e42ebb0bf6f44f06ecb877e18ea248c9f03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
- name: Install various APT tools (1)
apt: pkg={{ packages }}
vars:
packages:
- apt
- lsb-release
# something keeps recreating (without content) it if we delete it, so we
# leave it instead but ensure it's empty instead
- name: Create empty /etc/apt/sources.list
copy: content=""
dest=/etc/apt/sources.list
owner=root group=root
mode=0644
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
|