You need to mention connection type local for network devices.

---
- hosts: lab
  connection: local

The credentials to connect to remote network device can be mentioned either
in playbook within a provider
<https://docs.ansible.com/ansible/ios_command_module.html> or in host
inventory <http://docs.ansible.com/ansible/intro_inventory.html> file.


Regards,
Ganesh


On Thu, Jun 22, 2017 at 12:25 PM, Kai Stian Olstad <
[email protected]> wrote:

> On 20.06.2017 01:26, Patrick Matheny wrote:
>
>> I'm very new to Ansible.  I have a small lab running and I'm trying to
>> evaluate the use of Ansible for making network changes.  I have a
>> workstations running CentOS Linux release 7.3.1611 and Ansible 2.3.0 as a
>> fresh install.  I'm using a cisco 819 router running Cisco IOS Software,
>> C800 Software (C800-UNIVERSALK9-M), Version 15.3(3)M.3. I can SSH from the
>> workstation to the router from the work station and via putty on a windows
>> 10 machine  but when I try a connection test I get the following:
>>
>> [pat@new-host-8 ~]$ansible all -m ping
>> 192.168.1.142 | UNREACHABLE! => {
>>     "changed": false,
>>     "msg": "Failed to connect to the host via ssh: Connection closed\r\n",
>>     "unreachable": true
>> }
>>
>
> To run ansible on remote host the host need to support Python.
> When using the ping module Ansible creates a little Python script that is
> copied to the remote and then runs the python script on the remote host.
> But network equipment typically doesn't support Python.
>
> Ansible has support for Cisco, the iso_* modules.
> These modules are running on the Ansible control machine and do a ssh to
> the Cisco and runs the appropriate commands on the cli.
>
> --
> Kai Stian Olstad
>
> --
> 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 post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/ansible-project/1d2e654d608818eae65d0ae0d3ae8f76%40olstad.com.
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2B6y2sGjJuDGDi_csMFMz%3DSt5ibe%2BsxpndQrcaz_m2thKmL0cQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to