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! On Wed, Jul 10, 2019 at 2:07 PM Nilashish Chakraborty <[email protected]> wrote: > 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! > > On Tue, Jul 9, 2019 at 11:14 PM Anurag Bhatia <[email protected]> wrote: > >> 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 >> anuragbhatia.com >> >> -- >> 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/CAJ0%2BaXbOPG_Xn6c3erj7AVvQ49hADMBMHCo716yHTm-sns4ixg%40mail.gmail.com >> <https://groups.google.com/d/msgid/ansible-project/CAJ0%2BaXbOPG_Xn6c3erj7AVvQ49hADMBMHCo716yHTm-sns4ixg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > -- > > Nilashish Chakraborty > > Software Engineer, Ansible > > Red Hat <https://www.redhat.com/> > > -- > 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/CAJ6QEq0VOKkMgi-T54VmHFLq8YW%2Bzbz1%3D6e9ZM7E6FyPfj7XVQ%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CAJ6QEq0VOKkMgi-T54VmHFLq8YW%2Bzbz1%3D6e9ZM7E6FyPfj7XVQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Anurag Bhatia anuragbhatia.com -- 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/CAJ0%2BaXZehrMAyHwA1cn8SB5bD-8RBxhEcc9eTPrp5eCGzR%3D4Vw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
