Authentication Error (trying to getting started with network automation)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2020 10:22 AM
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
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2020 12:29 PM - edited 05-09-2020 12:31 PM
Hi
Check credentials -
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2020 01:42 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2020 01:51 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2020 11:05 PM - edited 05-09-2020 11:06 PM
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\".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2020 01:27 AM
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
