[WARNING]: Could not match supplied host pattern, ignoring: unprovisioned
[WARNING]: Found variable using reserved name: hosts

PLAY [Deploy initial device configuration] *************************************

TASK [Set variables that cannot be set with VARS] ******************************
ok: [spine]
ok: [l1]
ok: [l2]
ok: [h1]
ok: [h2]

TASK [Find device readiness script] ********************************************
ok: [l1]
ok: [spine]
ok: [l2]
ok: [h1]
ok: [h2]

TASK [Wait for device to become ready] *****************************************
skipping: [spine]
skipping: [l1]
skipping: [l2]
skipping: [h1]
skipping: [h2]

TASK [Normalize config on bridge-like devices] *********************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for spine, l1, l2, h1, h2

TASK [Figure out whether to deploy the module normalize on current device] *****
ok: [spine]
ok: [l1]
ok: [l2]
ok: [h1]
ok: [h2]

TASK [Find configuration template for normalize] *******************************
ok: [spine]
ok: [l1]
ok: [l2]
ok: [h2]
ok: [h1]

TASK [fail] ********************************************************************
skipping: [spine]
skipping: [l1]
skipping: [l2]
skipping: [h1]
skipping: [h2]

TASK [Find configuration deployment deploy_script for normalize] ***************
ok: [spine]
ok: [l1]
ok: [l2]
ok: [h1]
ok: [h2]

TASK [Print deployed configuration when running in verbose mode] ***************
skipping: [spine]
skipping: [l1]
skipping: [l2]
skipping: [h1]
skipping: [h2]

TASK [Deploy normalize configuration] ******************************************
skipping: [spine]
skipping: [l1]
skipping: [l2]
skipping: [h1]
skipping: [h2]

TASK [Deploy initial configuration] ********************************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for spine, l1, l2, h1, h2

TASK [Figure out whether to deploy the module initial on current device] *******
ok: [spine]
ok: [l1]
ok: [l2]
ok: [h1]
ok: [h2]

TASK [Find configuration template for initial] *********************************
ok: [spine]
ok: [l1]
ok: [l2]
ok: [h2]
ok: [h1]

TASK [fail] ********************************************************************
skipping: [spine]
skipping: [l1]
skipping: [l2]
skipping: [h1]
skipping: [h2]

TASK [Find configuration deployment deploy_script for initial] *****************
ok: [spine]
ok: [l1]
ok: [l2]
ok: [h2]
ok: [h1]

TASK [Print deployed configuration when running in verbose mode] ***************
ok: [h2] => 
  msg: |-
    initial configuration for h2
    =========================================
    #!/bin/bash
    #
    # This script contains the 'ip' commands needed to set up container
    # interfaces and route table. It's executed within the container
    # network namespace on the container host.
    #
    #  /etc/hosts file is generated as a clab bind.
    #
    set -e
  
    ### One-Shot configuration (non-Ubuntu VM or container)
    #
    # Disable IPv4 and IPv6 forwarding
    #
    sysctl -w net.ipv4.ip_forward=0
    sysctl -w net.ipv6.conf.all.forwarding=0
    #
    # Interface addressing, create any bond devices
    #
    ip link set dev eth1 up
    set +e
    ip addr del 172.31.1.5/24 dev eth1 2>/dev/null
    set -e
    ip addr add 172.31.1.5/24 dev eth1
    ip link set dev eth1 mtu 1500
    #
    # Add static routes (usually IPv4 routes pointing to the first usable gateway)
    #
    #
    #
    #
    # Print the final routing table
    ip route
ok: [spine] => 
  msg: |-
    initial configuration for spine
    =========================================
  
    - set:
        system:
          hostname: spine
          config:
            snippet:
              system-mtu:
                file: /etc/network/ifupdown2/policy.d/mtu.json
                content: |
                  { "address": { "defaults": { "mtu": "1500" } } }
  
        interface:
          eth0:
            ip:
              vrf: mgmt
              address:
                dhcp: {}
            type: eth
          swp1:
            type: swp
            link:
              mtu: 1600
              state:
                up : {}
            description: "spine -> l1 [external]"
            ip:
              address:
                10.1.0.2/30: {}
              ipv6:
                enable: off
  
          swp2:
            type: swp
            link:
              mtu: 1600
              state:
                up : {}
            description: "spine -> l2 [external]"
            ip:
              address:
                10.1.0.6/30: {}
              ipv6:
                enable: off
  
  
    - set:
        interface:
          lo:
            type: loopback
            ip:
              address:
                10.0.0.1/32: {}
              ipv6:
                enable: off
ok: [l1] => 
  msg: |-
    initial configuration for l1
    =========================================
  
    - set:
        system:
          hostname: l1
          config:
            snippet:
              system-mtu:
                file: /etc/network/ifupdown2/policy.d/mtu.json
                content: |
                  { "address": { "defaults": { "mtu": "1500" } } }
  
        interface:
          eth0:
            ip:
              vrf: mgmt
              address:
                dhcp: {}
            type: eth
          swp1:
            type: swp
            link:
              mtu: 1600
              state:
                up : {}
            description: "l1 -> spine [external]"
            ip:
              address:
                10.1.0.1/30: {}
              ipv6:
                enable: off
  
          swp2:
            type: swp
            link:
              state:
                up : {}
            description: "[Access VLAN red] l1 -> h1"
            ip:
              ipv6:
                enable: off
  
          vlan1000:
            type: svi
            link:
              state:
                up : {}
            description: "VLAN red (1000) -> [h1,h2,l2]"
            ip:
              ipv6:
                enable: off
  
  
    - set:
        interface:
          lo:
            type: loopback
            ip:
              address:
                10.0.0.2/32: {}
              ipv6:
                enable: off
ok: [h1] => 
  msg: |-
    initial configuration for h1
    =========================================
    #!/bin/bash
    #
    # This script contains the 'ip' commands needed to set up container
    # interfaces and route table. It's executed within the container
    # network namespace on the container host.
    #
    #  /etc/hosts file is generated as a clab bind.
    #
    set -e
  
    ### One-Shot configuration (non-Ubuntu VM or container)
    #
    # Disable IPv4 and IPv6 forwarding
    #
    sysctl -w net.ipv4.ip_forward=0
    sysctl -w net.ipv6.conf.all.forwarding=0
    #
    # Interface addressing, create any bond devices
    #
    ip link set dev eth1 up
    set +e
    ip addr del 172.31.1.4/24 dev eth1 2>/dev/null
    set -e
    ip addr add 172.31.1.4/24 dev eth1
    ip link set dev eth1 mtu 1500
    #
    # Add static routes (usually IPv4 routes pointing to the first usable gateway)
    #
    #
    #
    #
    # Print the final routing table
    ip route
ok: [l2] => 
  msg: |-
    initial configuration for l2
    =========================================
    #!/bin/bash
    #
    set -e
    set -x
    #
    # Create bash profile script
    #
    cat <<SCRIPT >/root/.bash_profile
    #!/bin/bash
    #
    export PS1="\h(bash)# "
    echo
    echo "Use vtysh to connect to FRR daemon"
    echo
    SCRIPT
    #
    # Get the current next hop for the default route
    #
    def_nh=$(ip route list default|awk '{ print $3 }')
    #
    # Create the management VRF and add eth0 to it
    #
    if [ ! -e /sys/devices/virtual/net/mgmt ]; then
      ip link add mgmt type vrf table 42
    fi
    ip link set mgmt up
    sysctl -qw net.ipv6.conf.eth0.keep_addr_on_down=1
    ip link set eth0 master mgmt
    #
    # Reinstall the default route if we had it before
    #
    if [[ -n "$def_nh" ]]; then
      ip route add 0.0.0.0/0 vrf mgmt via $def_nh
    fi
    #
    # Enable FRR modules (if not using containerlab bind-mounted /etc/frr/daemons)
    #
  
    #
    # Create loopbacks, stub and lag/bond devices
    #
    if [ ! -e /sys/class/net/lo ]; then
      if [ ! -e /sys/devices/virtual/net/lo ]; then
        ip link add lo type dummy
        ip link set dev lo up
      fi
    fi
  
    # Disable IPv6 (for IPv4-only interfaces) or SLAAC (if the device is a router)
    #
    sysctl -qw net.ipv6.conf.eth1.disable_ipv6=1
    ip link set dev eth1 mtu 1600
    sysctl -qw net.ipv6.conf.eth2.disable_ipv6=1
    ip link set dev eth2 mtu 1500
  
    #
    # Add vtysh.conf file
    echo "service integrated-vtysh-config" >/etc/frr/vtysh.conf
  
    #
    # Rest of initial configuration done through VTYSH
    #
    cat >/tmp/config <<CONFIG
    hostname l2
    !
    vrf mgmt
     exit-vrf
    !
    frr defaults datacenter
    !
    interface lo
     no shutdown
     ip address 10.0.0.3/32
    !
    interface eth1
     no shutdown
     description l2 -> spine [external]
     ip address 10.1.0.5/30
    !
    interface eth2
     no shutdown
     description [Access VLAN red] l2 -> h2
     ! no ip address
    !
    interface vlan1000
     no shutdown
     description VLAN red (1000) -> [h1,l1,h2]
     ! no ip address
    !
    do write
    CONFIG
    vtysh -f /tmp/config
    exit 0

TASK [Deploy initial configuration] ********************************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/cumulus_nvue.yml for spine, l1
included: /home/pipi/netlab_gh/netsim/ansible/tasks/frr/initial-clab.yml for l2
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/linux-clab.yml for h1, h2

TASK [set_fact] ****************************************************************
ok: [spine]
ok: [l1]

TASK [copy the cumulus nvue YAML initial config file to switch (generated from /home/pipi/netlab_gh/netsim/ansible/templates/initial/cumulus_nvue.j2)] ***
changed: [l1]
changed: [spine]

TASK [Wait for nvued to start] *************************************************
ok: [l1]
ok: [spine]

TASK [set_fact] ****************************************************************
ok: [spine]
ok: [l1]

TASK [execute on cumulus: 'nv config patch' for initial config] ****************
changed: [spine]
changed: [l1]

TASK [execute on cumulus: 'nv config apply -y' for initial config] *************
changed: [spine]
changed: [l1]

TASK [Attempt to load VRF kernel module] ***************************************
changed: [l2 -> localhost]

TASK [Disable FRR management VRF when modprobe fails] **************************
skipping: [l2]

TASK [include_tasks] ***********************************************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/frr/deploy-config.yml for l2

TASK [template] ****************************************************************
changed: [l2]

TASK [set_fact] ****************************************************************
ok: [l2]

TASK [run /tmp/config.sh to deploy initial config from /home/pipi/netlab_gh/netsim/ansible/templates/initial/frr.j2] ***
changed: [l2]

TASK [run vtysh to import initial config from /home/pipi/netlab_gh/netsim/ansible/templates/initial/frr.j2] ***
skipping: [l2]

TASK [Define script filename and determine whether to execute in netns] ********
ok: [h1]
ok: [h2]

TASK [Create a temporary file for the rendered script] *************************
changed: [h2 -> localhost]
changed: [h1 -> localhost]

TASK [Create container setup script from /home/pipi/netlab_gh/netsim/ansible/templates/initial/linux-clab.j2] ***
changed: [h1 -> localhost]
changed: [h2 -> localhost]

TASK [Copy script into running container at /tmp/config-h1_initial.sh] *********
skipping: [h1]
skipping: [h2]

TASK [Execute /tmp/config-h1_initial.sh to deploy initial config based on /home/pipi/netlab_gh/netsim/ansible/templates/initial/linux-clab.j2] ***
skipping: [h1]
skipping: [h2]

TASK [Container configuration for initial based on /home/pipi/netlab_gh/netsim/ansible/templates/initial/linux-clab.j2 executed in netns] ***
changed: [h1 -> localhost]
changed: [h2 -> localhost]

TASK [Remove temporary file /tmp/h1_initial-1f6mh4ez.sh] ***********************
changed: [h1 -> localhost]
changed: [h2 -> localhost]

PLAY [Deploy module-specific configurations] ***********************************

TASK [Set variables that cannot be set with VARS] ******************************
ok: [l1]
ok: [l2]
ok: [spine]

TASK [Deploy individual configuration modules] *********************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for l1, l2, spine => (item=vlan)
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for l1, l2, spine => (item=bgp)
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for l1, l2, spine => (item=vxlan)
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for l1, l2, spine => (item=evpn)

TASK [Figure out whether to deploy the module vlan on current device] **********
ok: [l1]
ok: [l2]
ok: [spine]

TASK [Find configuration template for vlan] ************************************
ok: [l1]
skipping: [spine]
ok: [l2]

TASK [fail] ********************************************************************
skipping: [l1]
skipping: [l2]
skipping: [spine]

TASK [Find configuration deployment deploy_script for vlan] ********************
skipping: [spine]
ok: [l1]
ok: [l2]

TASK [Print deployed configuration when running in verbose mode] ***************
skipping: [spine]
ok: [l2] => 
  msg: |-
    vlan configuration for l2
    =========================================
    #!/bin/bash
    #
    set -e # Exit immediately when any command fails
    #
    if [ ! -e /sys/devices/virtual/net/vlan1000 ]; then
      brctl addbr vlan1000
      ip link set dev vlan1000 address 52:dc:ca:fd:03:00
  
      ip addr flush dev vlan1000
    fi
  
    brctl addif vlan1000 eth2
  
    ip link set dev vlan1000 up
    exit 0
ok: [l1] => 
  msg: |-
    vlan configuration for l1
    =========================================
    - set:
        bridge:
          domain:
            br_default:
              type: vlan-aware
              untagged: none
              vlan:
                '1000': {}
  
  
    - set:
        interface:
         swp2:
           bridge:
             domain:
               br_default:
                 access: 1000

TASK [Deploy vlan configuration] ***********************************************
skipping: [spine]
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/cumulus_nvue.yml for l1
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/frr.yml for l2

TASK [set_fact] ****************************************************************
ok: [l1]

TASK [copy the cumulus nvue YAML vlan config file to switch (generated from /home/pipi/netlab_gh/netsim/ansible/templates/vlan/cumulus_nvue.j2)] ***
changed: [l1]

TASK [Wait for nvued to start] *************************************************
skipping: [l1]

TASK [set_fact] ****************************************************************
ok: [l1]

TASK [execute on cumulus: 'nv config patch' for vlan config] *******************
changed: [l1]

TASK [execute on cumulus: 'nv config apply -y' for vlan config] ****************
changed: [l1]

TASK [template] ****************************************************************
changed: [l2]

TASK [set_fact] ****************************************************************
ok: [l2]

TASK [run /tmp/config.sh to deploy vlan config from /home/pipi/netlab_gh/netsim/ansible/templates/vlan/frr.j2] ***
changed: [l2]

TASK [run vtysh to import vlan config from /home/pipi/netlab_gh/netsim/ansible/templates/vlan/frr.j2] ***
skipping: [l2]

TASK [Figure out whether to deploy the module bgp on current device] ***********
ok: [l1]
ok: [l2]
ok: [spine]

TASK [Find configuration template for bgp] *************************************
ok: [l1]
ok: [l2]
ok: [spine]

TASK [fail] ********************************************************************
skipping: [l1]
skipping: [l2]
skipping: [spine]

TASK [Find configuration deployment deploy_script for bgp] *********************
ok: [l1]
ok: [l2]
ok: [spine]

TASK [Print deployed configuration when running in verbose mode] ***************
ok: [l2] => 
  msg: |-
    bgp configuration for l2
    =========================================
    !
    router bgp 65201
      no bgp ebgp-requires-policy
      no bgp default ipv4-unicast
      bgp default show-hostname
      bgp default show-nexthop-hostname
  
      ! Consider AS paths of same length but with different AS as ECMP candidates
      bgp bestpath as-path multipath-relax
  
      bgp router-id 10.0.0.3
    !
      neighbor 10.1.0.6 remote-as 65100
      neighbor 10.1.0.6 description spine
    !
      neighbor 10.0.0.1 remote-as 65100
      neighbor 10.0.0.1 description spine
      neighbor 10.0.0.1 update-source lo
    !
     address-family ipv4 unicast
    !
  
    !
      network 10.0.0.3/32
    !
    !
    !
      neighbor 10.1.0.6 activate
      no neighbor 10.1.0.6 send-community all
      neighbor 10.1.0.6 send-community standard
      neighbor 10.1.0.6 send-community large
      neighbor 10.1.0.6 send-community extended
    !
    !
    !
    do write
ok: [l1] => 
  msg: |-
    bgp configuration for l1
    =========================================
    - set:
        router:
          bgp:
            enable: on
            autonomous-system: 65200
            router-id: 10.0.0.2
    - set:
        vrf:
          default:
            router:
              bgp:
                enable: on
                autonomous-system: 65200
                router-id: 10.0.0.2
                address-family:
                  ipv4-unicast:
                    enable: on
  
                    network:
                      10.0.0.2/32: {}
                neighbor:
                  10.1.0.2:
                    description: "spine"
                    remote-as: 65100
                    address-family:
                      ipv4-unicast:
                        enable: on
                        community-advertise:
                          regular: on
                          extended: on
                          large: off
  
                  10.0.0.1:
                    description: "spine"
                    update-source: lo
                    remote-as: 65100
                    address-family:
                      ipv4-unicast:
                        enable: off
                        community-advertise:
                          regular: on
                          extended: on
                          large: off
ok: [spine] => 
  msg: |-
    bgp configuration for spine
    =========================================
    - set:
        router:
          bgp:
            enable: on
            autonomous-system: 65100
            router-id: 10.0.0.1
    - set:
        vrf:
          default:
            router:
              bgp:
                enable: on
                autonomous-system: 65100
                router-id: 10.0.0.1
                address-family:
                  ipv4-unicast:
                    enable: on
  
                    network:
                      10.0.0.1/32: {}
                neighbor:
                  10.1.0.1:
                    description: "l1"
                    remote-as: 65200
                    address-family:
                      ipv4-unicast:
                        enable: on
                        community-advertise:
                          regular: on
                          extended: on
                          large: off
  
                  10.1.0.5:
                    description: "l2"
                    remote-as: 65201
                    address-family:
                      ipv4-unicast:
                        enable: on
                        community-advertise:
                          regular: on
                          extended: on
                          large: off
  
                  10.0.0.2:
                    description: "l1"
                    update-source: lo
                    remote-as: 65200
                    address-family:
                      ipv4-unicast:
                        enable: off
                        community-advertise:
                          regular: on
                          extended: on
                          large: off
  
                  10.0.0.3:
                    description: "l2"
                    update-source: lo
                    remote-as: 65201
                    address-family:
                      ipv4-unicast:
                        enable: off
                        community-advertise:
                          regular: on
                          extended: on
                          large: off

TASK [Deploy bgp configuration] ************************************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/cumulus_nvue.yml for l1, spine
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/frr.yml for l2

TASK [set_fact] ****************************************************************
ok: [l1]
ok: [spine]

TASK [copy the cumulus nvue YAML bgp config file to switch (generated from /home/pipi/netlab_gh/netsim/ansible/templates/bgp/cumulus_nvue.j2)] ***
changed: [spine]
changed: [l1]

TASK [Wait for nvued to start] *************************************************
skipping: [l1]
skipping: [spine]

TASK [set_fact] ****************************************************************
ok: [l1]
ok: [spine]

TASK [execute on cumulus: 'nv config patch' for bgp config] ********************
changed: [l1]
changed: [spine]

TASK [execute on cumulus: 'nv config apply -y' for bgp config] *****************
changed: [spine]
changed: [l1]

TASK [template] ****************************************************************
changed: [l2]

TASK [set_fact] ****************************************************************
ok: [l2]

TASK [run /tmp/config.sh to deploy bgp config from /home/pipi/netlab_gh/netsim/ansible/templates/bgp/frr.j2] ***
skipping: [l2]

TASK [run vtysh to import bgp config from /home/pipi/netlab_gh/netsim/ansible/templates/bgp/frr.j2] ***
changed: [l2]

TASK [Figure out whether to deploy the module vxlan on current device] *********
ok: [l1]
ok: [l2]
ok: [spine]

TASK [Find configuration template for vxlan] ***********************************
ok: [l1]
skipping: [spine]
ok: [l2]

TASK [fail] ********************************************************************
skipping: [l1]
skipping: [l2]
skipping: [spine]

TASK [Find configuration deployment deploy_script for vxlan] *******************
skipping: [spine]
ok: [l1]
ok: [l2]

TASK [Print deployed configuration when running in verbose mode] ***************
skipping: [spine]
ok: [l1] => 
  msg: |-
    vxlan configuration for l1
    =========================================
    - set:
        nve:
          vxlan:
            enable: on
            mac-learning: off
            source:
              address: 10.0.0.2
  
    - set:
        bridge:
          domain:
            br_default:
              vlan:
                '1000':
                  vni:
                    '1000': {}
ok: [l2] => 
  msg: |-
    vxlan configuration for l2
    =========================================
    #!/bin/bash
    #
    set -e # Exit immediately when any command fails
    #
  
  
  
    # Create L3 VNIs with bridges and add to correct vrf table
  
    # Create VXLAN L2 interface per vni
    ip link add vxlan1000 type vxlan \
      id 1000 \
      dstport 4789 \
      local 10.0.0.3 nolearning
    #
    # Add it to the VLAN bridge (create if needed for l3 vnis); disable STP
    if [ ! -e /sys/devices/virtual/net/vlan1000 ]; then
    brctl addbr vlan1000
    ip link set up dev vlan1000
    fi
    brctl addif vlan1000 vxlan1000
    brctl stp vlan1000 off
    # Do not generate ipv6 link-local address for VXLAN devices
    ip link set mtu 1500 addrgenmode none dev vxlan1000
    # Disable dynamic MAC learning for evpn, see https://docs.frrouting.org/en/latest/evpn.html
    bridge link set dev vxlan1000 learning off
    ip link set up dev vxlan1000
  
  
    exit $?

TASK [Deploy vxlan configuration] **********************************************
skipping: [spine]
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/cumulus_nvue.yml for l1
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/frr.yml for l2

TASK [set_fact] ****************************************************************
ok: [l1]

TASK [copy the cumulus nvue YAML vxlan config file to switch (generated from /home/pipi/netlab_gh/netsim/ansible/templates/vxlan/cumulus_nvue.j2)] ***
changed: [l1]

TASK [Wait for nvued to start] *************************************************
skipping: [l1]

TASK [set_fact] ****************************************************************
ok: [l1]

TASK [execute on cumulus: 'nv config patch' for vxlan config] ******************
changed: [l1]

TASK [execute on cumulus: 'nv config apply -y' for vxlan config] ***************
changed: [l1]

TASK [template] ****************************************************************
changed: [l2]

TASK [set_fact] ****************************************************************
ok: [l2]

TASK [run /tmp/config.sh to deploy vxlan config from /home/pipi/netlab_gh/netsim/ansible/templates/vxlan/frr.j2] ***
changed: [l2]

TASK [run vtysh to import vxlan config from /home/pipi/netlab_gh/netsim/ansible/templates/vxlan/frr.j2] ***
skipping: [l2]

TASK [Figure out whether to deploy the module evpn on current device] **********
ok: [l1]
ok: [l2]
ok: [spine]

TASK [Find configuration template for evpn] ************************************
ok: [l1]
ok: [l2]
ok: [spine]

TASK [fail] ********************************************************************
skipping: [l1]
skipping: [l2]
skipping: [spine]

TASK [Find configuration deployment deploy_script for evpn] ********************
ok: [l1]
ok: [l2]
ok: [spine]

TASK [Print deployed configuration when running in verbose mode] ***************
ok: [l2] => 
  msg: |-
    evpn configuration for l2
    =========================================
    #!/bin/bash
    #
    set -e
    cat >/tmp/evpn_config <<CONFIG
    router bgp 65201
     address-family l2vpn evpn
      advertise-all-vni
      advertise-svi-ip
      advertise ipv4 unicast
  
    ! Configure explicit Route Targets and RD per L2 VNI; auto-derived differs
      vni 1000
       rd 10.0.0.3:1000
       route-target export 65000:1000
       route-target import 65000:1000
      exit-vni
  
      neighbor 10.0.0.1 activate
      neighbor 10.0.0.1 soft-reconfiguration inbound
  
     exit-address-family
    !
  
    exit
  
    ! L3 VRF EVPN handling
    !
    do write
    CONFIG
    vtysh -f /tmp/evpn_config
    vtysh -c 'clear bgp *'
ok: [l1] => 
  msg: |-
    evpn configuration for l1
    =========================================
    ---
    - set:
        vrf:
          default:
            router:
              bgp:
                address-family:
                  l2vpn-evpn:
                    enable: on
                  ipv4-unicast:
                    route-export:
                      to-evpn:
                        enable: on
                neighbor:
                  10.0.0.1:
                    address-family:
                      l2vpn-evpn:
                        enable: on
                        soft-reconfiguration: on
  
    - set:
        system:
          config:
            snippet:
              frr.conf: |
                router bgp 65200
                  address-family l2vpn evpn
                    advertise ipv4 unicast
  
    - set:
        evpn:
          enable: on
          # dad                    Duplicate Address Detection (DAD) configuration parameters
          # mac-vrf-soo            EVPN MAC VRF Site-of-Origin VPN extended community in ASN:NN or IP-ADDRESS:NN format.
          # multihoming            Multihoming global configuration parameters
          # route-advertise        Route advertising
          route-advertise:
            nexthop-setting: system-ip-mac
            svi-ip: on
          # vni                    VNI
  
          vni:
            '1000':
              rd: 10.0.0.2:1000 # not 'auto'
              route-target:
                export:
                  '65000:1000': {}
                import:
                  '65000:1000': {}
  
    - set:
        nve:
          vxlan:
            mac-learning: off
            flooding:
              enable: on
              head-end-replication:
                evpn: {}
ok: [spine] => 
  msg: |-
    evpn configuration for spine
    =========================================
    ---
    - set:
        vrf:
          default:
            router:
              bgp:
                address-family:
                  l2vpn-evpn:
                    enable: on
                  ipv4-unicast:
                    route-export:
                      to-evpn:
                        enable: on
                neighbor:
                  10.0.0.2:
                    address-family:
                      l2vpn-evpn:
                        enable: on
                        soft-reconfiguration: on
                  10.0.0.3:
                    address-family:
                      l2vpn-evpn:
                        enable: on
                        soft-reconfiguration: on
  
    - set:
        system:
          config:
            snippet:
              frr.conf: |
                router bgp 65100
                  address-family l2vpn evpn
                    advertise ipv4 unicast
  
    - set:
        evpn:
          enable: on
          # dad                    Duplicate Address Detection (DAD) configuration parameters
          # mac-vrf-soo            EVPN MAC VRF Site-of-Origin VPN extended community in ASN:NN or IP-ADDRESS:NN format.
          # multihoming            Multihoming global configuration parameters
          # route-advertise        Route advertising
          route-advertise:
            nexthop-setting: system-ip-mac
            svi-ip: on
          # vni                    VNI

TASK [Deploy evpn configuration] ***********************************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/cumulus_nvue.yml for l1, spine
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/frr.yml for l2

TASK [set_fact] ****************************************************************
ok: [l1]
ok: [spine]

TASK [copy the cumulus nvue YAML evpn config file to switch (generated from /home/pipi/netlab_gh/netsim/ansible/templates/evpn/cumulus_nvue.j2)] ***
changed: [l1]
changed: [spine]

TASK [Wait for nvued to start] *************************************************
skipping: [l1]
skipping: [spine]

TASK [set_fact] ****************************************************************
ok: [l1]
ok: [spine]

TASK [execute on cumulus: 'nv config patch' for evpn config] *******************
changed: [spine]
changed: [l1]

TASK [execute on cumulus: 'nv config apply -y' for evpn config] ****************
changed: [l1]
changed: [spine]

TASK [template] ****************************************************************
changed: [l2]

TASK [set_fact] ****************************************************************
ok: [l2]

TASK [run /tmp/config.sh to deploy evpn config from /home/pipi/netlab_gh/netsim/ansible/templates/evpn/frr.j2] ***
changed: [l2]

TASK [run vtysh to import evpn config from /home/pipi/netlab_gh/netsim/ansible/templates/evpn/frr.j2] ***
skipping: [l2]

PLAY [Deploy custom deployment templates] **************************************

TASK [Run custom configuration deployment scripts] *****************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-custom-config.yml for l1, l2, spine => (item=ebgp.multihop)

TASK [Find configuration template] *********************************************
ok: [l1]
ok: [l2]
ok: [spine]

TASK [fail] ********************************************************************
skipping: [l1]
skipping: [l2]
skipping: [spine]

TASK [Check is the configuration template is a file] ***************************
ok: [l1 -> localhost]
ok: [l2 -> localhost]
ok: [spine -> localhost]

TASK [fail] ********************************************************************
skipping: [l1]
skipping: [l2]
skipping: [spine]

TASK [Process template /home/pipi/netlab_gh/netsim/extra/ebgp.multihop/cumulus_nvue.j2 for l1] ***
skipping: [l1]
skipping: [l2]
skipping: [spine]

TASK [Find custom configuration deployment script] *****************************
ok: [l1]
ok: [l2]
ok: [spine]

TASK [Run the configuration deployment script] *********************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/cumulus_nvue.yml for l1, spine
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/frr.yml for l2

TASK [set_fact] ****************************************************************
ok: [l1]
ok: [spine]

TASK [copy the cumulus nvue YAML ebgp.multihop config file to switch (generated from /home/pipi/netlab_gh/netsim/extra/ebgp.multihop/cumulus_nvue.j2)] ***
changed: [l1]
changed: [spine]

TASK [Wait for nvued to start] *************************************************
skipping: [l1]
skipping: [spine]

TASK [set_fact] ****************************************************************
ok: [l1]
ok: [spine]

TASK [execute on cumulus: 'nv config patch' for ebgp.multihop config] **********
changed: [l1]
changed: [spine]

TASK [execute on cumulus: 'nv config apply -y' for ebgp.multihop config] *******
changed: [l1]
changed: [spine]

TASK [template] ****************************************************************
changed: [l2]

TASK [set_fact] ****************************************************************
ok: [l2]

TASK [run /tmp/config.sh to deploy ebgp.multihop config from /home/pipi/netlab_gh/netsim/extra/ebgp.multihop/frr.j2] ***
skipping: [l2]

TASK [run vtysh to import ebgp.multihop config from /home/pipi/netlab_gh/netsim/extra/ebgp.multihop/frr.j2] ***
changed: [l2]

PLAY RECAP *********************************************************************
h1                         : ok=17   changed=4    unreachable=0    failed=0    skipped=7    rescued=0    ignored=0   
h2                         : ok=17   changed=4    unreachable=0    failed=0    skipped=7    rescued=0    ignored=0   
l1                         : ok=73   changed=18   unreachable=0    failed=0    skipped=17   rescued=0    ignored=0   
l2                         : ok=62   changed=13   unreachable=0    failed=0    skipped=19   rescued=0    ignored=0   
spine                      : ok=55   changed=12   unreachable=0    failed=0    skipped=23   rescued=0    ignored=0   



The devices under test are EVPN switches (leaf and spine) using
EVPN-over-multihop-EBGP. The leaf switch should generate and accept EVPN AF
routes, and the spine switch should propagate them without changing the BGP
next hop.

* h1 and h2 should be able to ping each other

Please note it might take a while for the lab to work due to
STP learning phase