very detailed inventory selection with Ansible

I design a new tool ansible on an existing system. The existing system is a large hardware testing platform. I need to be able to do things like:

Run the xyz task on all version 3 hosts using a Broadcom BCM57412 network controller.


run the xyz task on all hosts in the QA2 group that have firmware version 3 and HGST hard disks

I read the inventory capabilities with Ansible, and since it does not seem to have a conditional inventory choice, I guess we'll have to use an external inventory database.

Am I right?