--- # Apple EFI 1.x does not expose ext4 volumes via SimpleFileSystem, so the # kernel must live on the FAT32 EFI partition where rEFInd already scans \boot\. - name: "Ensure boot directory exists on EFI partition" ansible.builtin.file: path: "{{ mnt_boot_path }}/boot" state: directory mode: "0755" - name: "Copy kernel to EFI partition" ansible.builtin.copy: src: "{{ mnt_root_path }}/boot/{{ item }}" dest: "{{ mnt_boot_path }}/boot/{{ item }}" remote_src: true follow: true mode: "0644" loop: - "vmlinuz" - "initrd.img" - name: "Configure rEFInd boot options on EFI partition" ansible.builtin.template: src: "refind_linux.conf.j2" dest: "{{ mnt_boot_path }}/boot/refind_linux.conf" mode: "0644" - name: "Ensure kernel post-install hook directory exists" ansible.builtin.file: path: "{{ mnt_root_path }}/etc/kernel/postinst.d" state: directory mode: "0755" - name: "Install kernel sync script for EFI partition" ansible.builtin.copy: dest: "{{ mnt_root_path }}/etc/kernel/postinst.d/refind-sync-kernel" mode: "0755" content: | #!/bin/sh cp /boot/vmlinuz /boot/efi/boot/ cp /boot/initrd.img /boot/efi/boot/ - name: "Install bcmwl-kernel-source in chroot" ansible.builtin.command: cmd: "arch-chroot {{ mnt_root_path }} apt-get install -y bcmwl-kernel-source" environment: MAKEFLAGS: "" changed_when: true failed_when: false - name: "Configure unconfigured packages in chroot" ansible.builtin.command: cmd: "arch-chroot {{ mnt_root_path }} dpkg --configure -a" environment: MAKEFLAGS: "" changed_when: true failed_when: false - name: "Blacklist modules conflicting with broadcom-wl" ansible.builtin.copy: dest: "{{ mnt_root_path }}/etc/modprobe.d/broadcom-wl.conf" mode: "0644" content: | blacklist brcmfmac blacklist brcmutil blacklist b43 blacklist ssb blacklist bcma - name: "Load wl module at boot" ansible.builtin.lineinfile: path: "{{ mnt_root_path }}/etc/modules" line: "wl" create: true mode: "0644"