From f0d82c90d1d1ac487f4e0ba867c3f9f079207487 Mon Sep 17 00:00:00 2001 From: Saibotk Date: Wed, 14 Aug 2024 00:52:46 +0200 Subject: [PATCH] fix(luks_ssh): ensure network module is loaded --- roles/luks_ssh/files/90-network.conf | 1 + roles/luks_ssh/tasks/main.yml | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 roles/luks_ssh/files/90-network.conf diff --git a/roles/luks_ssh/files/90-network.conf b/roles/luks_ssh/files/90-network.conf new file mode 100644 index 0000000..795f64b --- /dev/null +++ b/roles/luks_ssh/files/90-network.conf @@ -0,0 +1 @@ +add_dracutmodules+=" network " diff --git a/roles/luks_ssh/tasks/main.yml b/roles/luks_ssh/tasks/main.yml index b130e39..237059b 100644 --- a/roles/luks_ssh/tasks/main.yml +++ b/roles/luks_ssh/tasks/main.yml @@ -90,6 +90,16 @@ become: true notify: Regenerate dracut +- name: Configure dracut to include network module for early networking + ansible.builtin.copy: + src: "90-network.conf" + dest: "/etc/dracut.conf.d/90-network.conf" + mode: "0644" + owner: "root" + group: "root" + become: true + notify: Regenerate dracut + - name: Check if line is present ansible.builtin.shell: cat /etc/default/grub | grep GRUB_CMDLINE_LINUX_DEFAULT changed_when: false