That was the problem. I changed the module to junos_facts which was already 
included with Ansible Tower.

---
- name: Get Device Facts
  hosts: all
  roles:
  connection: local
  gather_facts: no

  tasks:
  - name: Retrieve information from devices running Junos OS
    junos_facts:
      host={{ inventory_hostname }}
      port={{ ansible_ssh_port }}
    register: junos


On Friday, October 28, 2016 at 1:53:51 PM UTC-4, Peter Sprygada wrote:
>
> You are using the Juniper modules distributed from Galaxy which are not 
> compatible with Tower today.  The only modules that work with Tower 
> credentials are the Junos modules in core.
>
> On Fri, Oct 28, 2016 at 1:00 PM, Lance Le Roux <[email protected] 
> <javascript:>> wrote:
>
>> I am trying to use the network credentials in Ansible Tower however it 
>> doesn't seem to work. I am using variable ANSIBLE_NET_USERNAME and 
>> ANSIBLE_NET_PASSWORD however they don't exist when I run my template.
>>
>>
>> playbook.yaml
>> ---
>> - name: Get Device Facts
>>   hosts: all
>>   roles:
>>   - Juniper.junos 
>>   connection: local
>>   gather_facts: no
>>
>>   tasks:
>>   - name: Retrieve information from devices running Junos OS
>>     junos_get_facts:  
>>       host={{ inventory_hostname }}
>>       port=22
>>       user={{ ANSIBLE_NET_USERNAME }}
>>       passwd={{ ANSIBLE_NET_PASSWORD }}
>>     register: junos
>>
>>   - name: version
>>     debug: msg="{{ junos.facts.version }}"
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/1266659c-3d92-4ea3-85ca-5322bf4f0fea%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/1266659c-3d92-4ea3-85ca-5322bf4f0fea%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/b0847eeb-8881-4689-840b-f96573c2082b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to