To match hosts only starting with certain string a regex could be used for example to match hosts starting with the word fabrik:

---
- hosts: ~fabrik.*
  become: True
  tasks:
    - name: uname
      shell: uname -a
      register: uname

    - debug:
        var: uname.stdout

notice the ~