Stopping and starting of services on RHES servers

Good afternoon,

I am able to stop/start services on a server with ansible using ssh keys if I specify the services as items.

Is there a way to modify the hosts file to supply the service names by server and pick up as variables?

Better yet, is there a way to auto detect the service names and plug them in when found?

All of the services start with mq@ so there is a pattern to work off of.

Any help you can provide would be fantastic.

What is your source of truth?