You should not create /tmp directories on Cisco devices that don't
already have them.
We don't know what Cisco devices you have. Typically, you run Cisco
modules using the task level "delegate:" parameter to run them on
either the local host (the ansible controller) or some other host
that has appropriate network access. The modules use the appropriate
API to access the Cisco devices from the delegated host.
The "ping" module you used before is not an ICMP ping. It's a "yes I
can ssh into the remote host and there's an appropriate python
installed there" test. Which for Cisco devices is totally
inappropriate anyway.
Walter asked if you were delegating to localhost, and whether your
Cisco devices have a /tmp. You answered "yes", but didn't say which
question you were answering.
If you aren't delegating to either localhost or some other host with
appropriate network access to the Cisco APIs, you will likely not
have success. The Cisco devices I'm aware of will not play nicely
with attempted ssh connections, which is what your "ping" attempt
was trying to do.
Some hosts can be managed by ssh'ing in and using password-less sudo
commands -- that's the common paradigm. Not so with many dedicated
network devices like Cisco. Those you access via an authenticated
API from a designated host ("delegate:") and modules that speak
those APIs.
--
Todd