Ansible command execution failed

Problem:
I can’t run Ansible command from Foreman interface on hosts because he return an error :

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************

fatal: [172.16.0.1]: FAILED! => {"msg": "Unable to create local directories(/usr/share/foreman-proxy/.ansible/cp): [Errno 13] Permission denied: '/usr/share/foreman-proxy/.ansible/cp'"}
	to retry, use: --limit @/tmp/foreman-playbook-56a55faf-7a73-425b-8627-cfad5b75f7fa.retry

PLAY RECAP *********************************************************************

172.16.0.1              : ok=0    changed=0    unreachable=0    failed=1   

Statut de sortie : 2

Versions
foreman-tasks 0.14.5
foreman_ansible 2.3.3
foreman_execution 1.7.0
Ansible 2.7.10
smart_proxy 1.21.2

Why he didn’t get permissions, i’m runing with root and the ssh key of the proxy is on target.

Make sure the user foreman-proxy has write access to /usr/share/foreman-proxy/.ansible. The foreman proxy which starts ansible runs under this user. How did you install Foreman?

He’s administrator and i changed permissions read,write, execution for all users. So i created the repertories with root user in command line and the problem is fixed.

I installed foreman with foreman-installer
–enable-foreman-plugin-ansible
–enable-foreman-proxy-plugin-ansible \
–enable-foreman-plugin-remote-execution
–enable-foreman-proxy-plugin-remote-execution-ssh
–enable-foreman-cli-remote-execution