Need help for ansible Junos module

225 views
Skip to first unread message

Hitesh Kumar

unread,
Dec 7, 2019, 8:22:11 AM12/7/19
to ansible...@googlegroups.com
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"}

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

Stefan Hornburg (Racke)

unread,
Dec 7, 2019, 8:32:53 AM12/7/19
to ansible...@googlegroups.com
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
> --
> 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
> ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> 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.

signature.asc
Reply all
Reply to author
Forward
0 new messages