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
On 11/4/22 10:27 AM, Vivek Khochare wrote:
Do I need to create /tmp directory on cisco devices?
On Fri, 4 Nov 2022, 19:34 Vivek Khochare, <[email protected]>
wrote:
Yes.Cisco devices do not have tmp
On Fri, 4 Nov 2022, 19:33 'Rowe, Walter P. (Fed)' via Ansible
Project, <[email protected]> wrote:
Are you delegating the task to localhost? Your cisco devices
won't have a /tmp. Right?
Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123
On Nov 4, 2022, at 10:00 AM, Vivek Khochare
<[email protected]> wrote:
I am trying to check connection for cisco devices
Below is the command :
ansible all -i <inventory> -m ping -u <usr_name> -k
In Inventory file I added cisco device IPs
On Fri, 4 Nov 2022, 16:34 'Rowe, Walter P. (Fed)' via Ansible
Project, <[email protected]> wrote:
Show your playbook and ansible.cfg.
Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123
On Nov 4, 2022, at 4:35 AM, Vivek Khochare
<[email protected]> wrote:
Yes..I change the permission for /tmp and also create
new path
But still same error
On Fri, 4 Nov 2022, 03:16 Dick Visser,
<[email protected]> wrote:
Did you follow the recommendation that is literally
part of the error message?
On Thu, 3 Nov 2022 at 21:39, Vivek Khochare
<[email protected]> wrote:
Hi All
I am getting the error "Failed to create
temporary directory.In Some Cases,you may have
been able to authenticate and did not have
permission on the target directory.Consider
changing the remote tmp path in ansible.cfg to a
path rooted in \"/tmp\"
Can someone please help me on this?
Thanks
--
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b1b3d661-f1b5-61ec-d110-1392a695533d%40gmail.com.