Issue with iosxr_bgp module

20 views
Skip to first unread message

Anurag Bhatia

unread,
Jul 9, 2019, 1:44:32 PM7/9/19
to ansible...@googlegroups.com
Hello,


Anyone using iosxr_bgp? If yes, can you share a sample working playbook? 

I built one using example given here: https://docs.ansible.com/ansible/latest/modules/iosxr_bgp_module.html but it doesn't work. 


My test playbook

---
  - hosts: xrv
    gather_facts: no

    tasks:
      - name: Configure BGP session
        iosxr_bgp:
         config:
            address_family:
              afi: ipv4
              networks:
                network: 192.168.0.0
                masklen: 24
            bgp_as: 12345
            log_neighbor_changes: yes
            router_id: 1.1.1.1
            neighbors:
              - neighbor: 10.0.0.1
                remote_as: 58901
                description: anurag-test
         operation: replace






Output of playbook

ansible-playbook host-bgp-config.yml

PLAY [xrv] *********************************************************************************************************************************************************************

TASK [Configure BGP session] ***************************************************************************************************************************************************
fatal: [xrv]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "Unsupported parameters for (iosxr_bgp) module: provider Supported parameters include: config, operation"}

PLAY RECAP *********************************************************************************************************************************************************************
xrv                        : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0



I see that the sample config doesn't include start and end with "config" and "operation" parameters. Tried with them as well as without them and having this issue. 



Thanks for your time in advance! 

--


Anurag Bhatia

Nilashish Chakraborty

unread,
Jul 10, 2019, 2:08:02 AM7/10/19
to ansible...@googlegroups.com
Hi Anurag,

Based on the error message, it seems you're passing `provider` dict. This not supported. {ios, eos, iosxr, frr}_bgp modules support only ansible_connection: network_cli and not ansible_connection: local.

Thanks!

--
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.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ0%2BaXbOPG_Xn6c3erj7AVvQ49hADMBMHCo716yHTm-sns4ixg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--

Nilashish Chakraborty

Software Engineer, Ansible

Red Hat

Anurag Bhatia

unread,
Jul 11, 2019, 10:51:33 PM7/11/19
to ansible...@googlegroups.com
That was exactly the problem. Changed to ansible_connection: network_cli and it worked. 
Hope to see the same dependency on the module documentation page. 

Thanks, Nilashish!


For more options, visit https://groups.google.com/d/optout.


--


Anurag Bhatia
Reply all
Reply to author
Forward
0 new messages