host patterns doesn't work in group inventory

I got a predefined group monitor with many monitoring parameters that will be used in prometheus/alertmanager/node-exporter.

inventory/hosts
[monitor] 10.1.1.1 10.2.2.2 10.3.3.3

group_vars/monitor.yml

`

prometheus_version: xxx

prometheus_port: xxx
`

playbooks/monitor.yml
`

  • hosts: monitor
    roles:
  • {role: prometheus}
    `

There was a problem when using dynamic inventory. No hosts were selected when using host patterns in group inventory.
[monitor] us-west:!tags_k8s*:!tags_win*

They were never meant to work in inventory, they are used to 'select
FROM inventory' but not to define it.

See group_by and 'constructed' inventory plugin instead.