I will check it out tomorrow thanks!

On Wednesday, April 13, 2016 at 3:59:11 PM UTC+2, Mike Biancaniello wrote:
>
> might there be an application firewall between you and the switch that 
> allows openssh, but not paramiko?
>
> On Wednesday, April 13, 2016 at 9:11:30 AM UTC-4, Oscar Bengtsson wrote:
>>
>> Hi,
>> From what I understood netconf is not needed for this module, but yes it 
>> is enabled from when i tried using junipers own-developed role from 
>> ansible-galaxy.
>> I don't want to use netconf as most vendors don't have it.
>>
>>
>> On Monday, April 11, 2016 at 7:33:25 PM UTC+2, Matt Hite wrote:
>>>
>>> Is netconf enabled under "system services"?
>>>
>>> On Thu, Apr 7, 2016 at 7:41 AM, Oscar Bengtsson <[email protected]> 
>>> wrote:
>>>
>>>> Hi,
>>>> I'm trying to get a playbook to connect to a juniper switch and do a 
>>>> 'show version'
>>>> I'm totally new to this and wanted to do this without the use of yaml 
>>>> files for username and password.
>>>> This is the code for the playbook:
>>>>
>>>>
>>>> *---*
>>>> *- hosts: switches*
>>>> *  gather_facts: no*
>>>> *  connection: local*
>>>>
>>>> *  tasks:*
>>>> *  - name: DEFINE PROVIDER*
>>>> *    set_fact:*
>>>> *      hostinfo:*
>>>> *        host: "{{ inventory_hostname }}"*
>>>> *        password: ***************
>>>> *        username: root*
>>>> *  - debug: var=hostvars[inventory_hostname]*
>>>> *  - name: show command*
>>>> *    junos_command:*
>>>> *      provider: "{{ hostinfo }}"*
>>>> *      commands:*
>>>> *        - show version*
>>>> *    register: version*
>>>>
>>>> The host file contains only 1 ip address to the switch.
>>>> I get this error for task "show command"
>>>>
>>>> *fatal: [172.18.10.25]: FAILED! => {"changed": false, "failed": true, 
>>>> "invocation": {"module_args": {"commands": ["show version"], "host": 
>>>> "172.18.10.25", "interval": 1, "password": 
>>>> "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "port": 22, "provider": null, 
>>>> "retries": 10, "username": "root", "waitfor": null}, "module_name": 
>>>> "junos_command"}, "msg": "failed to connecto to 172.18.10.25:22 
>>>> <http://172.18.10.25:22> - "}*
>>>>
>>>> Is there something wrong with my code? I also tried specifying the 
>>>> username/password inside the task, didnt work either.
>>>> I can SSH to the switch from my server if not using ansible.
>>>>
>>>> Thanks!
>>>> Oscar Bengtsson
>>>>
>>>> -- 
>>>> 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/ec69eb29-19db-4eff-a17b-0c9513654c49%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/ansible-project/ec69eb29-19db-4eff-a17b-0c9513654c49%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> 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/7acac637-3992-4ffb-8ef1-231dc5dc441b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to