Foreman Proxy Ansiblle User

Problem:
I have the problem, when i try to run a ansible role over the smart proxy on a client, it always shows this error in the ansible log on the smart roxy server:

[root@smart-proxy foreman-proxy]#  tail -n200 /var/log/ansible.log 
023-02-05 11:45:15,215 p=1348620 u=foreman-proxy n=ansible | PLAY [all] *********************************************************************
2023-02-05 11:45:15,234 p=1348620 u=foreman-proxy n=ansible | TASK [Gathering Facts] *********************************************************
2023-02-05 11:45:15,344 p=1348620 u=foreman-proxy n=ansible | fatal: [tsrvma201]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: \n################################################################################\n### This is an actively monitored system.\n### Unauthorized Access Prohibited.\n################################################################################\n\nroot@tsrvma201: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).", "unreachable": true}
2023-02-05 11:45:15,345 p=1348620 u=foreman-proxy n=ansible | PLAY RECAP *********************************************************************
2023-02-05 11:45:15,346 p=1348620 u=foreman-proxy n=ansible | tsrvma201                  : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0

I can connect password less with ssh from the smart proxy to the client, but only with the root user. In this log the proxy always try to connect with the foreman-proxy user. So i add to the ansible hosts file following line:
tsrvma201 ansible_connection=ssh ansible_user=root

But this is not working. The job also tells me that the root user should be running the ansible role:

I set the remote execution user also to root, but despite all these settings, it still takes the foreman-proxy user.

Do you have any idea where i can change the user who execute the role on the smart-proxy server?

Expected outcome:

Succesfull ansible role execution.

Foreman and Proxy versions:
Foreman:
foreman.noarch 3.5.1-1.el8
ansible [core 2.14.0]

External Smart Proxy:
foreman-proxy.noarch 3.5.1-1.el8
ansible [core 2.13.3]

I’m not following what you’re trying to do. The logs clearly say it is trying to connect as root (root@tsrvma201: Permission denied). If you’re referring to the u=foreman-proxy part, that just means that the ansible process on the smart proxy runs as foreman-proxy user. That is something you cannot really change.

ohh sorry i didnt see that. You are right thanks. The SSH Keys were the problem