Ansible playbook to configure a Raspberry Pi as a Wi-Fi access point without a password, and log all connected clients in real time.
- Open Wi-Fi hotspot (no password)
- DHCP configuration
- Static IP setup on
wlan0 - Systemd-based logging of connected devices (
iw dev wlan0 station dump) - Fully automated via Ansible
-
Update
inventory.iniwith your Raspberry Pi IP or hostname:[raspberry] raspberrypi.local ansible_user=pi ansible_ssh_pass=raspberry ansible_become=true
-
Run the playbook:
ansible-playbook -i inventory.ini playbook.yml
-
Check log:
sudo tail -f /var/log/wifi_clients.log
- Raspberry Pi with built-in Wi-Fi (or USB dongle)
- OS: Raspberry Pi OS Lite or Full
- Ansible installed on your local machine
MIT