How generate dynamic host file with only IP of concrete vendor (by MAC)

Hello to everybody. I would like run ansible playbook on all RPi (raspberry) in our network (at this moment we have around 300 pieces). All RPi have a IP dynamic from DHCP server. My idea is scann complete network found all live IP, get MAC of IP, filter only MAC with RPi vendor and from this IP create a list, dynamic host file. I have ansible on Linux for shure. What you recomend for quick solution? Nmap? Ping by sh from python? I all ready tried some solution but is too slow and non comfortable … maybe somebody solving similar problem in history. Thx

Take a look at https://docs.ansible.com/ansible/latest/plugins/inventory/nmap.html

I’m using the following Playbook, which is taken the IP Address Entered from the Jenkins Pipeline: