How to troubleshoot clients with ansible rols

I am testing the ansible plugin and how to run ansible roles on clients. Now I am wondering how to develop/troubleshoot this properly. It’s unclear to me how foreman runs the roles on the client if I use the “Run Ansible roles” action. During testing, I would like to run this manually either on the foreman server or ideally on the client directly, because starting the job from foreman every time I make a change is cumbersome.

But it’s not clear to me how this is mapped to actual shell commands. If I understand correctly, it’s using ansible-runner to use ansible directly, but I suppose there would be an ansible or ansible-playbook command equivalent I could use to achieve the same. But being relatively new to ansible I really don’t understand how. So far I have only used some playbooks to feed to foreman-ansible roles to set up my foreman server, but this now is different.

Right now, I only want to test the rhel-sytem-roles, e.g. to configure the firewall. With puppet I can run puppet agent --test on the client at any time to test and see the results directly. I can change a host parameter and quickly test. Now I would like to do the same with ansible, e.g. run the same playbook/role as foreman would do with ansible-runner and use check mode to see what would happen directly. Then I could change the parameters until it fits and eventually run this through foreman.

Can anyone shed some light on this? Thanks!