summaryrefslogtreecommitdiffstats
path: root/roles/bootstrap/tasks/install-archlinux-mac.yml
blob: 9184207b06d463884675b8f4499c6e4ac1b79acd (plain) (blame)
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
---
- name: "Ensure EFI/refind directory exists for Mac NVRAM compatibility"
  ansible.builtin.file:
    path: "{{ mnt_boot_path }}/EFI/refind"
    state: directory
    mode: "0755"
  # Mac NVRAM entries persist across disk wipes (stored in firmware) and point to EFI/refind/
  # refind-install --usedefault only creates EFI/BOOT/ so we must create this explicitly
  tags: ["molecule-notest"]

- name: "Copy rEFInd binary to EFI/refind for Mac NVRAM entries"
  ansible.builtin.copy:
    src: "{{ mnt_boot_path }}/EFI/BOOT/bootx64.efi"
    dest: "{{ mnt_boot_path }}/EFI/refind/refind_x64.efi"
    remote_src: true
    mode: "0644"
  tags: ["molecule-notest"]

- name: "Configure rEFInd base settings in EFI/refind for Mac NVRAM entries"
  ansible.builtin.template:
    src: "refind.conf.j2"
    dest: "{{ mnt_boot_path }}/EFI/refind/refind.conf"
    mode: "0644"
  tags: ["molecule-notest"]

- name: "Install broadcom-wl driver"
  ansible.builtin.command:
    cmd: "arch-chroot {{ mnt_root_path }} pacman -S --noconfirm broadcom-wl"
  changed_when: true

- 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.copy:
    dest: "{{ mnt_root_path }}/etc/modules-load.d/broadcom-wl.conf"
    mode: "0644"
    content: |
      wl