summaryrefslogtreecommitdiff
path: root/std.yml
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-01-08 16:17:35 +0200
committerLars Wirzenius <liw@liw.fi>2022-01-08 16:17:35 +0200
commitf8e3f4a638b27cb025672dfa129e44ff3278b1a1 (patch)
treefc8629ff0f763a470c8aed058891426c7b910b0f /std.yml
parent889f540f80e96f196d610bb469384d4d2144ca61 (diff)
downloadv-i-f8e3f4a638b27cb025672dfa129e44ff3278b1a1.tar.gz
use systemd-networkd to get network access, instead of ifupdown
Sponsored-by: author
Diffstat (limited to 'std.yml')
-rw-r--r--std.yml25
1 files changed, 23 insertions, 2 deletions
diff --git a/std.yml b/std.yml
index f2911ad..19304ae 100644
--- a/std.yml
+++ b/std.yml
@@ -8,9 +8,10 @@
{{ hostname }}
dest: /etc/hostname
- - name: "disable root password"
+ - name: "remove root password"
shell: |
- passwd -l root
+ # passwd -l root
+ sed -i '/^root:[^:]*:/root::/' /etc/passwd
- name: "create ~root/.ssh"
file:
@@ -70,6 +71,26 @@
# regex: "#* *PasswordAuthentication"
# line: "PasswordAuthentication no"
+ - name: "configure networkd"
+ copy:
+ content: |
+ [Match]
+ Name=eth0
+
+ [Network]
+ DHCP=ipv4
+ dest: /etc/systemd/network/lan0.network
+
+ - name: "remove ifupdown"
+ apt:
+ name: ifupdown
+ state: absent
+
+ - name: "enable networkd"
+ systemd:
+ name: systemd-networkd
+ enabled: yes
+
vars:
hostname: v-i
user_pub: |