Ansible Bug: skipping no hosts matched

Hi All

I am having an issue with ansbible. I have created an inventory folder and declared a hostgroup for different nodes

for example, in inventory file
[NodeGroup1]
node1@node.node

[NodeGroup2]
node2@node.node
node3@node.node

This inventory is stored under /environment/testEnv

When running a playbook using --extra vars and declaring the name of the host group like so
ansible-playbook deploy_rpm.yml -i environment/testEnv --extra-vars=‘{“hostgroup”: “NodeGroup1”, “var1”: “test-rpm”, “version”: “0.1”}’

When i run it, it passes and deploys the rpm.
When the hostgroup is named wrong, ‘NodeGroup999’ for example.
ansible-playbook deploy_rpm.yml -i environment/testEnv --extra-vars=‘{“hostgroup”: “NodeGroup999”, “var1”: “test-rpm”, “version”: “0.1”}’

It will just PLAY RECAP and silently fail.
I want to ansible to fail completely if this happens but cant see anything online and cant put in any debug as it doesnt actually run a task.

From what i can see its more of an bug with ansible than the playbook i have created.

Any ideas?

Thanks