I want to call ansible all -m ping
to Cisco NX-OS switch (v9.x) using Ansible 2.10.8 in Ubuntu 22.04 (Python3.10.6).
But an error occurred like below
DS2 | 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-1685779849.641992-40852-58343258243109 `\" && echo ansible-tmp-1685779849.641992-40852-58343258243109=\"` echo /tmp/ansible-tmp-1685779849.641992-40852-58343258243109 `\" ), exited with result 16, stdout output: Syntax error while parsing '/bin/sh -c '( umask 77 && mkdir -p \"` echo /tmp `\"&& mkdir \"` echo /tmp/ansible-tmp-1685779849.641992-40852-58343258243109 `\" && echo ansible-tmp-1685779849.641992-40852-58343258243109=\"` echo /tmp/ansible-tmp-1685779849.641992-40852-58343258243109 `\" ) && sleep 0''\n\n\nCmd exec error.\n",
"unreachable": true
}
I also changed remote_tmp
variable bootflash:/xx
but still error is occurred.
Please help me.
Change remote_tmp
value (ansible config file)