additionaly, i ran the playbook with the option -vvv. Ansible seem to have created the directory, however returned a 255 which triggered an ssh-retry. The ssh-retry returned with an exit 1 since the directory already exists.
<my_server> ESTABLISH SSH CONNECTION FOR USER: None
<my_server> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=360 -o ControlPath=/home/ansible/.ansible/cp/f52420a193 my_server ‘/bin/sh -c ‘"’“‘rm -f -r /tmp/ansible-tmp-1651552384.85-38092-103098107436542/ > /dev/null 2>&1 && sleep 0’”’“‘’
<my_server> (0, ‘’, ‘’)
<my_server> ESTABLISH SSH CONNECTION FOR USER: None
<my_server> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=360 -o ControlPath=/home/ansible/.ansible/cp/f52420a193 my_server '/bin/sh -c '”‘"’( umask 77 && mkdir -p “echo /tmp
”&& mkdir “echo /tmp/ansible-tmp-1651552386.34-38125-21691224005877
” && echo ansible-tmp-1651552386.34-38125-21691224005877=“echo /tmp/ansible-tmp-1651552386.34-38125-21691224005877
” ) && sleep 0’“'”‘’
<my_server> (255, ‘’, ‘’)
<my_server> ssh_retry: attempt: 1, ssh return code is 255. cmd ([‘ssh’, ‘-C’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘ConnectTimeout=360’, ‘-o’, ‘ControlPath=/home/ansible/.ansible/cp/f52420a193’, ‘my_server’, ‘/bin/sh -c '( umask 77 && mkdir -p “echo /tmp
”&& mkdir “echo /tmp/ansible-tmp-1651552386.34-38125-21691224005877
” && echo ansible-tmp-1651552386.34-38125-21691224005877=“echo /tmp/ansible-tmp-1651552386.34-38125-21691224005877
” ) && sleep 0'’]…), pausing for 0 seconds
<my_server> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=360 -o ControlPath=/home/ansible/.ansible/cp/f52420a193 my_server ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “echo /tmp
”&& mkdir “echo /tmp/ansible-tmp-1651552386.34-38125-21691224005877
” && echo ansible-tmp-1651552386.34-38125-21691224005877=“echo /tmp/ansible-tmp-1651552386.34-38125-21691224005877
” ) && sleep 0’“'”‘’
<my_server> (1, ‘’, ‘mkdir: das Verzeichnis \xbb/tmp/ansible-tmp-1651552386.34-38125-21691224005877\xab kann nicht angelegt werden: Die Datei existiert bereits\n’)
<my_server> Failed to connect to the host via ssh: mkdir: das Verzeichnis ?/tmp/ansible-tmp-1651552386.34-38125-21691224005877? kann nicht angelegt werden: Die Datei existiert bereits
TASK [stat] ********************************************************************
task path: /home/ansible/inventory/playbooks/1_deployments/wildfly_debug.yml:24
fatal: [ my_server ]: UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in "/tmp", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p "echo /tmp
"&& mkdir "echo /tmp/ansible-tmp-1651552386.34-38125-21691224005877
" && echo ansible-tmp-1651552386.34-38125-21691224005877="echo /tmp/ansible-tmp-1651552386.34-38125-21691224005877
" ), exited with result 1”,
“unreachable”: true
}