77 lines
2.0 KiB
YAML
77 lines
2.0 KiB
YAML
---
|
|
|
|
###############################################
|
|
# Pipeline to install realtek drivers
|
|
###############################################
|
|
|
|
- name: Realtek - Pre-install - Display lspci output
|
|
debug:
|
|
msg: "{{ realtek_adapters }}"
|
|
ignore_errors: true
|
|
|
|
- name: Realtek - Pre-install - get interfaces
|
|
shell: ip ad | grep def | grep -v -e dock -e veth -e lo -e tun | cut -d ":" -f 1-2
|
|
register: og_iface_list
|
|
|
|
- name: Realtek - Pre-install - Display interfaces
|
|
debug:
|
|
msg: "{{ og_iface_list.stdout_lines }}"
|
|
|
|
- name: Realtek - Pre-install - Check if already installed
|
|
command: dpkg -l firmware-realtek
|
|
register: realtek_installed
|
|
ignore_errors: true
|
|
|
|
- name: Realtek - Install Firmware Package
|
|
apt:
|
|
name:
|
|
- firmware-realtek
|
|
state: present
|
|
register: apt_result
|
|
when: realtek_installed.failed | bool
|
|
|
|
- name: Realtek - Reboot Endpoint if just installed
|
|
reboot:
|
|
msg: "Rebooting endpoint"
|
|
when: realtek_installed.failed | bool
|
|
|
|
- name: Realtek - Post-install - get interfaces
|
|
shell: ip ad | grep def | grep -v -e dock -e veth -e lo -e tun | cut -d ":" -f 1-2
|
|
register: rltk_iface_list
|
|
when: realtek_installed.failed | bool
|
|
|
|
- name: Realtek - Post-install - Display interfaces
|
|
debug:
|
|
msg: "{{ rltk_iface_list.stdout_lines }}"
|
|
when: realtek_installed.failed | bool
|
|
|
|
- name: Realtek - rtl8821ce install
|
|
when: rtl8821ce_present | bool
|
|
block:
|
|
- name: rtl8821ce - Install prereqs
|
|
apt:
|
|
name:
|
|
- bc
|
|
- module-assistant
|
|
- build-essential
|
|
- dkms
|
|
state: present
|
|
|
|
- name: rtl8821ce - clone the repo
|
|
shell: "git clone https://github.com/tomaspinho/rtl8821ce.git /opt/cosmos"
|
|
|
|
- name: rtl8821ce - make prepare and install
|
|
shell: |
|
|
touch /etc/modprobe.d/blacklist.conf
|
|
yes | m-a prepare
|
|
./dkms-install.sh
|
|
args:
|
|
chdir: /opt/cosmos/rtl8821ce
|
|
|
|
- name: rtl8821ce - blacklist the thing
|
|
lineinfile:
|
|
path: "/etc/modprobe.d/blacklist.conf"
|
|
regexp: '^blacklist rtw88_8821ce'
|
|
|
|
|
|
... |