blob: a02b07c302a2a96b5b212181c65550a11d1ac425 (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
- name: Copy systemd.network(5) configuration
template: src=etc/systemd/network/01-wired.network.j2
dest=/etc/systemd/network/01-wired.network
owner=root group=root
mode=0644
notify:
- Restart systemd-networkd
- name: Start systemd-networkd
service: name=systemd-networkd.service enabled=true state=started
- meta: flush_handlers
- name: Remove ifupdown and isc-dhcp-*
apt: pkg={{ packages }} state=absent purge=yes
vars:
packages:
- ifupdown
- isc-dhcp-client
- isc-dhcp-common
- name: Remove /etc/network/interfaces and /etc/network/interfaces.d
file: path={{ item }} state=absent
with_items:
- /etc/network/interfaces
- /etc/network/interfaces.d/
- name: Install systemd-resolved
apt: pkg={{ packages }}
vars:
packages:
- systemd-resolved
- libnss-resolve
- libnss-myhostname
- name: Create directory /etc/systemd/resolved.conf.d
file: path=/etc/systemd/resolved.conf.d
state=directory
owner=root group=root
mode=0755
- name: Configure systemd-resolved
copy: src=etc/systemd/resolved.conf.d/local.conf
dest=/etc/systemd/resolved.conf.d/local.conf
owner=root group=root
mode=0644
notify:
- Restart systemd-resolved
- name: Start systemd-resolved
service: name=systemd-resolved.service enabled=true state=started
- meta: flush_handlers
- name: Remove resolvconf
apt: pkg=resolvconf state=absent purge=yes
- name: Install systemd-timesyncd
apt: pkg=systemd-timesyncd
- name: Create directory /etc/systemd/timesyncd.conf.d
file: path=/etc/systemd/timesyncd.conf.d
state=directory
owner=root group=root
mode=0755
- name: Configure systemd-timesyncd
copy: src=etc/systemd/timesyncd.conf.d/local.conf
dest=/etc/systemd/timesyncd.conf.d/local.conf
owner=root group=root
mode=0644
notify:
- Restart systemd-timesyncd
- name: Start systemd-timesyncd
service: name=systemd-timesyncd.service enabled=true state=started
- meta: flush_handlers
- name: Remove ntp
apt: pkg={{ packages }} state=absent purge=yes
vars:
packages:
- ntp
- ntpdate
- ntpsec
- ntpsec-ntpdate
|