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