Skip to content

Instantly share code, notes, and snippets.

@IPvSean
Created June 30, 2017 18:18
Show Gist options
  • Save IPvSean/b64694cdb56cb6f2a240cc5bdc9e5b6e to your computer and use it in GitHub Desktop.
Save IPvSean/b64694cdb56cb6f2a240cc5bdc9e5b6e to your computer and use it in GitHub Desktop.
convert from LNV to EVPN with ansible (simple example playbook)
---
- hosts: leaf01,leaf03
become: yes
tasks:
- name: check current quagga version for EVPN
command: "systemctl status vxrd.service"
register: lnvstate
failed_when: ansible_lsb.release != "3.3.2"
- name: debug lnvstate
debug:
var: lnvstate.stdout
- name: Configure BGP
nclu:
commands:
- add bgp evpn neighbor fabric activate
- add bgp evpn advertise-all-vni
atomic: true
- name: see if EVPN is up
nclu:
commands:
- show bgp neighbor swp51
register: evpnstate
- name: debug evpnstate
debug:
var: evpnstate
- name: debug peers
debug:
var: evpnstate.msg
- name: stop service lnv if BGP adj for evpn, and LNV is running
systemd: name=vxrd.service state=stopped
when: '"active (running)" in lnvstate.stdout and "L2VPN EVPN: advertised and received" in evpnstate.msg'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment