cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Updates to Sandbox Reservation Internet Access Policy

Due to changes in our networking policies, we are updating the internet access policy within our sandbox reservation instances.
Hosts will no longer have internet access outbound.
This should not affect the overall functionality or access to the resources within the sandbox instances, connecting via VPN.

Keep Innovating!

DevNet Sandbox Team

302
Views
0
Helpful
5
Replies
Highlighted
Beginner

Authentication Error (trying to getting started with network automation)

So I found out how to "install" the Ubuntu CL app on windows. I installed ansible perfectly... so going off of network chuck's video, I changed the host file to disable SSH checking and input my inventory in the "hosts" file... When I go to ping I get the following:

root@DamoriLaptop:/etc/ansible# ansible routers -m ping

ios-xe-mgmt-latest.cisco com  | UNREACHABLE! => {

"changed": false,

"msg": "Authentication or permission failure. 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\". Failed command was: ( umask 77 && mkdir -p \"` echo /root/.ansible/tmp/ansible-local-68u0nbvilf/ansible-tmp-1589039158.3237498-180235897022789 `\" && echo ansible-tmp-1589039158.3237498-180235897022789=\"` echo /root/.ansible/tmp/ansible-local-68u0nbvilf/ansible-tmp-1589039158.3237498-180235897022789 `\" ), exited with result 1, stdout output: ansible-tmp-1589039158.3237498-180235897022789=/root/.ansible/tmp/ansible-local-68u0nbvilf/ansible-tmp-1589039158.3237498-180235897022789\n",

"unreachable": true

}

ios-xe-mgmt.cisco.com  | UNREACHABLE! => {

"changed": false,

"msg": "Authentication or permission failure. 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\". Failed command was: ( umask 77 && mkdir -p \"` echo /root/.ansible/tmp/ansible-local-68u0nbvilf/ansible-tmp-1589039158.3418562-8128221867368 `\" && echo ansible-tmp-1589039158.3418562-8128221867368=\"` echo /root/.ansible/tmp/ansible-local-68u0nbvilf/ansible-tmp-1589039158.3418562-8128221867368 `\" ), exited with result 1, stdout output: ansible-tmp-1589039158.3418562-8128221867368=/root/.ansible/tmp/ansible-local-68u0nbvilf/ansible-tmp-1589039158.3418562-8128221867368\n",

"unreachable": true

}

Everyone's tags (5)
5 REPLIES 5
Highlighted
Collaborator
Collaborator

Re: Authentication Error (trying to getting started with network automation)

Hi

Check credentials - 

ios-xe-mgmt.cisco.com

ios-xe-mgmt-latest.cisco.com

Make sure you are providing port 8181 for SSH connection.

I have tried to login and credentials work.

You cannot ping the sandboxes.. you get request timeout. 

 

Highlighted
Beginner

Re: Authentication Error (trying to getting started with network automation)

So I think I figured it out, not really sure if I really "figured it out" but I got it to work...

 

I was following NetworkChuck for two videos at once (Docker and Ansible) one he used Ubuntu (Docker) and the other he used CentOS (Ansible)... so I did that (recreated the lab with CentOS instead of Ubuntu) and I could connect just fine...

I'm new to Linux but I'm learning for Network Automation, but I thought they are both Linux-Based and would work interchangeably, similar to how Windows10 apps work on Windows Server... Am I wrong? 

Highlighted
Collaborator
Collaborator

Re: Authentication Error (trying to getting started with network automation)

Ansible and Docker work on both Ubuntu and CentOS. But they are installed differently based on the OS.

Ansible playbook that works in Ubuntu should also work in CentOS.

There may be some difference in the config. 

 

Highlighted
Beginner

Re: Authentication Error (trying to getting started with network automation)

That's what I figured, so shouldn't it have Ping'd from ubuntu as it did from CentOS? I did the same exact steps from Chuck's videos and this time I used CentOS and it worked... I went back to ubuntu and recreated the lab and it didn't work... So you're saying that the ansible.cfg is different?.... so my question is where is the /tmp\ file the error is talking about? 

 

Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\". 

Highlighted
Collaborator
Collaborator

Re: Authentication Error (trying to getting started with network automation)

Hi

By default /tmp is created in user's home directory remote_tmp = $HOME/.ansible/tmp

You can change the default in ansible.cfg file

[defaults]
remote_tmp = /tmp/ansible-$USER

 

Please don't forget to rate any helpful posts 

CreatePlease to create content
Content for Community-Ad
Cisco Community May 2020 Spotlight Award Winners