So I figured that out.  But now i'm not able to connect to any of the
network devices.

All of them are showing unreachable when running ansible-playbook with
--check.

Here is my config:

 cat asa-showrun.yml
---
- hosts: "cisco-fw-ip"

  tasks:
  - name: sho run
    set_fact:
      cli:
        host: "{{ cisco-fw-ip }}"
        username: "rancid"
        password: "{{ password }}"
        authorize: yes
        auth_pass: "{{ password }}"
        transport: cli

  - asa_command:
      commands:
        - show version
      provider: "{{ cli }}"

  - asa_command:
      commands:
        - show run
        - show memory
      provider: "{{ cli }}"

  - asa_command:
      commands:
        - show version
      provider: "{{ cli }}"
      context: system

Here is my output:

ansible-playbook asa-showrun.yml --check

PLAY [cisco-fw-ip]
**************************************************************************************************************************

TASK [Gathering Facts]
**********************************************************************************************************************
fatal: []: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to
the host via ssh: Permission denied (publickey,password).\r\n",
"unreachable": true}
fatal: []: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to
the host via ssh: Permission denied (password).\r\n", "unreachable": true}
fatal: []: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to
the host via ssh: Permission denied (password).\r\n", "unreachable": true}
fatal: []: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to
the host via ssh: Permission denied (publickey,password).\r\n",
"unreachable": true}
fatal: []: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to
the host via ssh: Permission denied (publickey,password).\r\n",
"unreachable": true}
fatal: []: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to
the host via ssh: Connection timed out during banner exchange\r\n",
"unreachable": true}
fatal: []: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to
the host via ssh: Connection timed out during banner exchange\r\n",
"unreachable": true}
fatal: []: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to
the host via ssh: Connection timed out during banner exchange\r\n",
"unreachable": true}





Please remember to reply to all if there are multiple recipients.

Andrew Meyer
[email protected]
[email protected]
314-266-4837

On Wed, Jul 26, 2017 at 1:28 PM, Kai Stian Olstad <
[email protected]> wrote:

> On 26. juli 2017 17:09, Andrew Meyer wrote:
>
>> I seem to be having some issues making this playbook work.  I want to just
>> do a show run on all my cisco devices, but it keeps throwing errors about
>> the '- vars:' or something else.  I am on the latest version.
>>   rpm -qa|grep -i ansible
>> ansible-inventory-grapher-2.3.2-1.el7.noarch
>> ansible-2.3.1.0-1.el7.noarch
>> ansible-review-0.13.0-2.el7.noarch
>> ansible-openstack-modules-0-20140902git79d751a.el7.noarch
>> ansible-lint-3.4.12-1.el7.noarch
>> ansible-doc-2.3.1.0-1.el7.noarch
>>
>>
>> - vars:
>>    hosts: cisco-fw
>>
> >      cli:
>
> You have them in the wrong order, it should be this way
>
> - hosts: cisco-fw
>   vars:
>     cli:
>
> --
> Kai Stian Olstad
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/ansible-project/mIo1cOaimrU/unsubscribe.
> To unsubscribe from this group and all its topics, 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/fe46bf8b-7bf4-ee58-af9c-fa7f06b9413e%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/CAEAR6cN3u5RZiOotVUKPmQtetnhgWkiGQY_HwK-Aras%3D-r6A2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to