-
Notifications
You must be signed in to change notification settings - Fork 0
/
wifi.yml
53 lines (41 loc) · 1.16 KB
/
wifi.yml
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
48
49
50
51
52
53
---
- hosts: localhost
tasks:
- name: Check if Intel Wifi repo is cloned
stat:
path: /opt/linux-firmware
register: checkout_intel_wifi
- name: Clone the Intel 8265 WIFI drivers repository
git:
repo: 'https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git'
dest: /opt/linux-firmware
update: no
when: checkout_intel_wifi
- name: Copy iwl-8265-34 file to /lib/firmware
copy:
src: /opt/linux-firmware/iwlwifi-8265-34.ucode
dest: /lib/firmware/
mode: '0644'
- name: Copy iwl-8265-36 file to /lib/firmware
copy:
src: /opt/linux-firmware/iwlwifi-8265-36.ucode
dest: /lib/firmware/
mode: '0644'
- name: Install Hotspot
apt:
pkg:
- hostapd
state: present
- name: Unmask Hotspot service
shell: systemctl unmask hostapd
notify:
- Restart hostapd
- name: Setup wifi hotspot
template: src=templates/hostapd.conf.j2 dest=/etc/hostapd/hostapd.conf owner=root group=root
notify:
- Restart hostapd
handlers:
- name: Restart hostapd
ansible.builtin.service:
name: hostapd
state: restarted