On 12/7/19 2:21 PM, Hitesh Kumar wrote:
> Need Help : Getting error while running ansible playbook for Junos rpc
> 
> atal: [vSRX-1]: FAILED! => {"ansible_facts": 
> {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false,
> "msg": "Unsupported parameters for (junos_rpc) module: dest, format, passwd, 
> user Supported parameters include: args,
> attrs, host, output, password, port, provider, rpc, ssh_keyfile, timeout, 
> transport, username"}

The error message clearly states that you are using the wrong parameters for 
the junos_rpc module.
Sometimes this happens because of incorrect indentation, but that doesn't seem 
the problem here.

Regards
         Racke

> 
> Ansible Playbook
> 
> user@user-virtual-machine:/etc/ansible$ cat bgpstat.yaml
> ---
> - name: get bgp status
>   hosts:
>     - all
>   roles:
>     - Juniper.junos
>   connection: local
>   gather_facts: no
> 
>   vars_prompt:
>     - name: username
>       prompt: Junos Username
>       private: no
>     - name: password
>       prompt: Junos Password
>       private: yes
> 
>   tasks:
>     - name: get bgp neighbot state
>       junos_rpc:
>         rpc: get-system-uptime-information
>         format: xml
>         dest: "{{ inventory_hostname }}-uptime.xml"
>         host: "{{ ansible_host }}"
>         port: 22
>         user: "{{ username }}"
>         passwd: "{{ password }}"
> 
>       register: uptime
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CANQHRf2uWOBGaKUVV1t5nFws%2B2BjOzTxxcjdvWd9pm6K7wH7OA%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CANQHRf2uWOBGaKUVV1t5nFws%2B2BjOzTxxcjdvWd9pm6K7wH7OA%40mail.gmail.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/cfd6b16a-bae0-d171-0827-e4da197c1edb%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to